public void Register() { if (m_name != null && m_componentMethodName != null) { LunarConsole.RegisterAction(m_name, Invoke); } }
public IEnumerator TestOpenClose() { SceneManager.LoadScene("MainScene", LoadSceneMode.Single); yield return(null); int openCount = 0; int closeCount = 0; LunarConsole.onConsoleOpened += () => ++ openCount; LunarConsole.onConsoleClosed += () => ++ closeCount; Assert.AreEqual(0, openCount); Assert.AreEqual(0, closeCount); LunarConsole.Show(); Assert.AreEqual(1, openCount); LunarConsole.Show(); Assert.AreEqual(1, openCount); LunarConsole.Hide(); Assert.AreEqual(1, closeCount); LunarConsole.Hide(); Assert.AreEqual(1, closeCount); }
void OnDestroy() { LunarConsole.UnregisterAllActions(this); LunarVariables.dragSensitivity.RemoveDelegate(ChangeDragSensitivity); LunarVariables.debug.RemoveDelegate(ChangeDebugMode); }
void OnDestroy() { LunarConsole.UnregisterAllActions(this); LunarVariables.combineDuration.RemoveDelegate(SetCellCombineDuration); LunarVariables.combineInterval.RemoveDelegate(SetCellCombineInterval); }
void Start() { LunarConsole.RegisterAction("Theme A", ChangeThemeA); LunarConsole.RegisterAction("Thene B", ChangeThemeB); LunarVariables.dragSensitivity.AddDelegate(ChangeDragSensitivity); LunarVariables.debug.AddDelegate(ChangeDebugMode); }
void Start() { LunarConsole.RegisterAction("Combine Type A", ChangeCombineTypeA); LunarConsole.RegisterAction("Combine Type B", ChangeCombineTypeB); LunarConsole.RegisterAction("Combine Type C", ChangeCombineTypeC); LunarVariables.combineDuration.AddDelegate(SetCellCombineDuration); LunarVariables.combineInterval.AddDelegate(SetCellCombineInterval); }
// Use this for initialization void Start() { LunarConsole.RegisterAction("Set Red Color", delegate() { StartCoroutine(SetColor(Color.red)); }); LunarConsole.RegisterAction("Set Green Color", delegate() { StartCoroutine(SetColor(Color.green)); }); LunarConsole.RegisterAction("Set Blue Color", delegate() { StartCoroutine(SetColor(Color.blue)); }); }
public void Register() { if (string.IsNullOrEmpty(m_name)) { Log.w("Unable to register action: name is null or empty"); } else if (m_target == null) { Log.w("Unable to register action '{0}': target GameObject is missing", m_name); } else if (string.IsNullOrEmpty(m_componentMethodName)) { Log.w("Unable to register action '{0}' for '{1}': function is missing", m_name, m_target.name); } else { LunarConsole.RegisterAction(m_name, Invoke); } }
public IEnumerator Init() { LunarConsole.RegisterAction("Forced GameOver", () => { GameManager.instance.onGameOver(); }); if (_isInitComplete) { yield break; } Debug.Log("CommonManager Init Start"); yield return(StartCoroutine(BuildManager.Instance.Init())); yield return(StartCoroutine(DataManager.Instance.Init())); yield return(StartCoroutine(SoundManager.Instance.Init())); yield return(StartCoroutine(NetworkManager.Instance.Init())); Debug.Log("CommonManager Init End"); _isInitComplete = true; }
public void EnableConsole() { LunarConsole.SetConsoleEnabled(true); }
public void DisableConsole() { LunarConsole.SetConsoleEnabled(false); }
public void ShowConsole() { LunarConsole.Show(); }
public void ClearConsole() { LunarConsole.Clear(); }
public void Unregister() { LunarConsole.UnregisterAction(Invoke); }
private void RegisterLunar() { LunarConsole.RegisterAction("Show UI", this.ShowUI); LunarConsole.RegisterAction("Hide UI", this.HideUI); }
public void CloseConsole() { LunarConsole.Hide(); }
void OnDestroy() { LunarConsole.UnregisterAllActions(this); }
private void RegisterAction() { LunarConsole.RegisterAction(m_title, InvokeAction); }
private void UnregisterAction() { LunarConsole.UnregisterAction(InvokeAction); }
public void OpenConsole() { LunarConsole.Show(); }