Files
2026-03-04 09:37:33 +08:00

23 lines
528 B
C#

using UnityEngine;
namespace ECM2.Walkthrough.Ex61
{
public class Bouncer : MonoBehaviour
{
public float launchImpulse = 15f;
public bool overrideVerticalVelocity;
public bool overrideLateralVelocity;
private void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player") && other.TryGetComponent<Character>(out var component))
{
component.PauseGroundConstraint();
component.LaunchCharacter(base.transform.up * launchImpulse, overrideVerticalVelocity, overrideLateralVelocity);
}
}
}
}