22 lines
No EOL
541 B
C#
22 lines
No EOL
541 B
C#
using UnityEngine;
|
|
|
|
public class DevCubeTrigger : MonoBehaviour
|
|
{
|
|
[Header("Настройки квеста")]
|
|
[SerializeField] private string actionType = "Touch";
|
|
[SerializeField] private string targetId = "DevCube";
|
|
[SerializeField] private int amountPerTouch = 1;
|
|
|
|
private void Start()
|
|
{
|
|
}
|
|
|
|
|
|
private void OnTriggerEnter2D(Collider2D other)
|
|
{
|
|
if (other.CompareTag("Player"))
|
|
{
|
|
MANAGER_GameEvents.OnQuestAction?.Invoke(actionType, targetId, amountPerTouch);
|
|
}
|
|
}
|
|
} |