Beispiel #1
0
 public void Unlock()
 {
     if (StateContainer.State != DoorState.Unlocked)
     {
         StateContainer.State = DoorState.Unlocked;
     }
     else
     {
         OnDoorUnlocked?.Invoke();
     }
 }
Beispiel #2
0
        public void Unlock()
        {
            Debug.Log($"Door {nameof(Unlock)} called.");

            if (StateContainer.State != DoorState.Unlocked)
            {
                StateContainer.State = DoorState.Unlocked;
            }
            else
            {
                OnDoorUnlocked?.Invoke();
            }
        }