metahunt/Assets/Scripts/JumpBooster.cs
2024-02-11 13:53:18 +05:30

20 lines
435 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class JumpBooster : MonoBehaviour
{
public float boost = 100;
private void OnTriggerStay(Collider other)
{
if(other.tag == "Player")
{
if(other.GetComponent<PlayerController>() != null)
{
other.GetComponent<PlayerController>().OnJumpBoost(boost);
}
}
}
}