void State_beginMoving_Update() { if (!elevatorZone.IsPointWithin(Common.GetStealthPlayer().transform.position)) { smc.SetState(idle); return; } foreach (DoorMain door in doors) { if (!door.GetIsClosed()) { return; } } smc.SetState(moving); }
public void State_unactive_Update() { if (myZone.IsPointWithin(Common.GetStealthPlayer().transform.position)) { smc.SetState(lightson); mySound.StopAllGlobalEvents(); mySound.PlayIndependentEvent("static.vente", true, 0); } }