using System; using UnityEngine; public class TurnZoneHandler : MonoBehaviour { public event Action
onTurn; private void OnTriggerEnter(Collider other) { TurnZone zone = other.GetComponentInParent(); if (!(zone == null) && !zone.isTurn) { zone.useTurn(); if (this.onTurn != null) { this.onTurn(zone.section); } } } }