LethalCompany/Lethal Company/ExportedProject/Assets/Scripts/Assembly-CSharp/WhoopieCushionTrigger.cs

16 lines
364 B
C#
Raw Normal View History

2023-12-23 00:55:14 +00:00
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();
}
}
}