Exemplo n.º 1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "Player")
     {
         stateMachine.SetState(RoomStateMachine.StateId.GameOver);
     }
 }
Exemplo n.º 2
0
    private void OnTriggerEnter(Collider other)
    {
        RoomStateMachine scriptRef = roomStateMachine.GetComponent <RoomStateMachine>();

        if (scriptRef.GetCurrentState() == RoomStateMachine.StateId.NotStarted)
        {
            scriptRef.SetState(RoomStateMachine.StateId.Hacking);
        }
    }