LethalCompany/Lethal Company/ExportedProject/Assets/Scripts/Assembly-CSharp/WhoopieCushionTrigger.cs
2023-12-22 19:55:14 -05:00

15 lines
364 B
C#

using UnityEngine;
public class WhoopieCushionTrigger : MonoBehaviour
{
public WhoopieCushionItem itemScript;
private void OnTriggerEnter(Collider other)
{
if (!itemScript.isHeld && (other.gameObject.CompareTag("Player") || other.gameObject.CompareTag("Enemy")))
{
Debug.Log("Collided with whoopie cushion");
itemScript.FartWithDebounce();
}
}
}