void Start() { ph = GlobalPanelHandler.Instance; sm = SCManager.Instance; ch = CameraHandler.Instance; ws = WinstonStats.Instance; gs = GameStatus.Instance; da = DiaryAnimation.Instance; continuar.onClick.AddListener(() => { displayInGameMenu(menuIsOn); }); goMainMenu.onClick.AddListener(() => sm.LoadScene(sm.ReturnLastSceneName())); exitGame.onClick.AddListener(() => Application.Quit()); StartCoroutine(EndGameChecker()); guardarSalir.onClick.AddListener(() => SaveExit()); playAgain.onClick.AddListener(() => sm.LoadScene("game1")); menuPrincipal.onClick.AddListener(() => sm.LoadScene("start")); }
// Use this for initialization void Start() { GlobalPanelHandler ph = GlobalPanelHandler.Instance; DataBaseHandler db = DataBaseHandler.Instance; SCManager sm = SCManager.Instance; startGameButton.onClick.AddListener(() => { ph.HoverShowUp(HoverPanel); ph.PanelShowUp(JugarPartidaPanel); }); historialButton.onClick.AddListener(() => { ph.HoverShowUp(HoverPanel); ph.PanelShowUp(Historial); }); exitButton.onClick.AddListener(() => { Application.Quit(); }); HoverButton.onClick.AddListener(() => { ph.HoverShowOff(HoverPanel); ph.PanelShowOff(); }); ngAceptButton.onClick.AddListener(() => { db.CreateGame("Game1"); sm.LoadScene("game1"); }); ngCancelButton.onClick.AddListener(() => { ph.HoverShowOff(HoverPanel); ph.PanelShowOff(); }); db.UpdatePlayersDropdown(playersDrops); ngNewUser.onClick.AddListener(() => { ph.PanelShowUp(NewUser); }); }