public void Submit() { switch (menu) { case Pmenu.ToBattle: BGMer.Instance.Delete(); GameObject.Find("root").GetComponent <BattleManager>().ReGame(); break; case Pmenu.ToChar: BGMer.Instance.Delete(); GameObject.Find("root").GetComponent <BattleManager>().BreakGame("CharSelect"); break; case Pmenu.ToTitle: BGMer.Instance.Delete(); GameObject.Find("root").GetComponent <BattleManager>().BreakGame("Start"); break; case Pmenu.EndGame: Application.Quit(); break; case Pmenu.Resume: pausable.Submit(); break; default: throw new ArgumentOutOfRangeException(); } }
private void Update() { if (!inFight) { return; } if (Input.GetButtonDown("Start")) { pausable.Submit(); timer.ReverseMoveAble(); } }