initial commit

This commit is contained in:
2026-05-16 16:12:06 +08:00
parent a7e4ebd4f8
commit f432cfa92f
1008 changed files with 409466 additions and 0 deletions
@@ -0,0 +1,21 @@
using UnityEngine;
using Platformer.Mechanics;
public class PlatformerJumpPad : MonoBehaviour
{
public float verticalVelocity;
void OnTriggerEnter2D(Collider2D other)
{
var rb = other.attachedRigidbody;
if (rb == null) return;
var player = rb.GetComponent<PlayerController>();
if (player == null) return;
AddVelocity(player);
}
void AddVelocity(PlayerController player)
{
player.velocity.y = verticalVelocity;
}
}