Import 2D Level

This commit is contained in:
2026-04-30 00:53:30 +02:00
parent c67979c7cf
commit 5797038baf
479 changed files with 430785 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;
}
}