LethalCompany/Lethal Company/ExportedProject/Assets/Scripts/Assembly-CSharp/CleanPlayerBodyTrigger.cs
2023-12-22 18:30:10 -05:00

24 lines
488 B
C#

using GameNetcodeStuff;
using UnityEngine;
public class CleanPlayerBodyTrigger : MonoBehaviour
{
private bool enableCleaning = true;
public void EnableCleaningTrigger(bool enable)
{
enableCleaning = enable;
}
private void OnTriggerStay(Collider other)
{
if (enableCleaning && other.CompareTag("Player"))
{
PlayerControllerB component = other.gameObject.GetComponent<PlayerControllerB>();
if (component != null)
{
component.RemoveBloodFromBody();
}
}
}
}