You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/3rd/D2D_Scripts/Gameplay/SetActivityOnPlayerEnter.cs

20 lines
472 B
C#

2 months ago
using System;
using D2D.Gameplay;
using D2D.Utilities;
using D2D.Utils;
using UnityEngine;
namespace D2D
{
public class SetActivityOnPlayerEnter : MonoBehaviour
{
[SerializeField] private bool _activityStateOnPlayerEnter;
[SerializeField] private GameObject _target;
private void OnTriggerEnter(Collider other)
{
if (other.Is<Player>())
_target.SetActive(_activityStateOnPlayerEnter);
}
}
}