public override void StateBegin() { m_menu = DouduckGameCore.GetModule <GameObjectControlModule> ().GetGameObjectSet <MainMenuSet> ("MainMenu"); m_menu.Show(); m_menu.Events.OnButtonClick += OnButtonClick; }
// Update is called once per frame void Update() { if (mainMenuChecked == false) { GameObject menuGO = GameObject.Find("MainMenuSet(Clone)"); if (menuGO) { MainMenuSet menuNew = menuGO.GetComponent <MainMenuSet>(); if (menuNew && menuNew.gameRunNow) { Debug.Log("game is running now!"); mainMenuChecked = true; } } } else { swingFunction(); } // IncreaseSwingSpeed(); }