public void OnButtonClick(Button sender) { //disableButtons(); if (sender == btnStart) { room.Start(); } else if (sender == btnComplete) { room.Complete(); } else if (sender == btnAbort) { room.Abort(); } else if (sender == btnReset) { room.Initialize(); } else if (sender == btnShutdown) { Application.Quit(); } }
private void resetRoom() { if (room.State.CanTransition(RoomState.Aborted)) { room.Abort(); } if (!room.State.CanTransition(RoomState.Initialized)) { audio.PlaySound(SoundDirector.ErrorSound); return; } room.Physical.OverrideLighting = false; room.Initialize(); if (room.State == RoomState.Error) { audio.PlaySound(SoundDirector.ErrorSound); return; } }