private void HandleEvent(GameObject eventObj) { string eventObjTag = eventObj.tag; switch (eventObjTag) { case "HomePageStartGameButton": { break; } case "HomePageOptionsButton": { break; } case "HomePagePVEButton": { this.GameController.GameType = GameType.PVE; this.GameController.MyFactionType = FactionType.Blue; this.GameController.GetFSM().ChangeState(GameState_BeforeStartGame.Instance()); break; } case "HomePagePVPButton": { this.GameController.GameType = GameType.PVP; this.GameController.GetFSM().ChangeState(GameState_Matching.Instance()); break; } case "GameResultBackToMenuButton": { Time.timeScale = 1; GameSceneController gameSceneCtrl = GameObject.Find("GameSceneController").GetComponent <GameSceneController>(); gameSceneCtrl.BackToMainMenu(); this.GameController.GetFSM().ChangeState(GameState_HomePage.Instance()); break; } } }