20 lines
435 B
C#
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);
|
|
}
|
|
}
|
|
}
|
|
}
|