public override IEnumerator Execute() { yield return(EventFlashScreen.c(.15f).Execute()); yield return(EventFlashScreen.c(.15f).Execute()); oldMusic = Global.s.ActiveBGM; oldVolume = Global.s.ActiveBGMVolume; AudioController.instance.PlayBGM((int)BGM.NONE, .4f); yield return(EventBlinds.c.Execute()); BattleController.instance.InitBattle(battle); yield return(EventWait.c(1f).Execute()); yield return(EventFade.c(-1f, Color.black).NoYield.Execute()); CameraBlinds.instance.HideBlinds(); yield return(EventTextboxClose.c.Execute()); yield return(EventWait.c(1f).Execute()); BattleController.instance.StartBattle(); yield return(new WaitUntil(() => BattleController.instance.curBattle == Battles.None)); yield return(EventFade.c(1f).Execute()); BattleController.instance.FinishedBattle(); AudioController.instance.PlayBGM(oldMusic, oldVolume); yield return(EventFade.c(-1f).Execute()); }
public Elevator() { ElevatorState = State.Wait; WaitFloors = new List <Floor>(); for (int i = 1; i <= 10; ++i) { WaitFloors.Add(new Floor(i)); } ComeToFloors = new List <Floor>(); for (int i = 1; i <= 10; ++i) { ComeToFloors.Add(new Floor(i)); } Doors = new Doors(); CurrentFloor = 0; go = 0; EventGoUp += GoUp; EventGoDown += GoDown; EventWaitWithOpenDoors += WaitWithOpenDoors; EventWait += Wait; EventOpen += Open; EventClose += Close; EventWait?.Invoke(); }
public void SetWaitFloor(int i) { WaitFloors[i - 1].SetWait(); if (ElevatorState == State.Wait) { EventWait?.Invoke(); } }
public override IEnumerator Execute() { //yield return EventFade.c(3f).Execute(); Credits.StartPlaying(); yield return(EventFade.c(-.4f).Execute()); yield return(new WaitUntil(() => Credits.Finished)); yield return(EventWait.c(1f).Execute()); Global.ResetLevel(); }
IEnumerator GameOverPlay() { yield return(EventWait.c(1f).Execute()); yield return(EventFade.c(1f).Execute()); KeepCameraInBounds.instance.objectToFollow = instance.gameOverScreenObject; yield return(EventBGM.c(BGM.GameOver, .4f).Execute()); yield return(EventFade.c(-.4f).Execute()); yield return(new WaitUntil(() => InputController.JustPressed(Action.Any))); yield return(EventFade.c(2f).Execute()); yield return(EventBGM.c(BGM.NONE).Execute()); yield return(EventWait.c(.2f).Execute()); //KeepCameraInBounds.instance.objectToFollow = WorldspaceUI.instance.MainMenu_Selected.transform.parent.gameObject; Global.ResetLevel(); }
public void CallEventWait() { EventWait?.Invoke(); }