Beispiel #1
0
 public void Register()
 {
     if (m_name != null && m_componentMethodName != null)
     {
         LunarConsole.RegisterAction(m_name, Invoke);
     }
 }
Beispiel #2
0
        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);
    }
Beispiel #4
0
    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);
    }
Beispiel #6
0
    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));
        });
    }
Beispiel #8
0
 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);
 }
Beispiel #12
0
 public void ShowConsole()
 {
     LunarConsole.Show();
 }
Beispiel #13
0
 public void ClearConsole()
 {
     LunarConsole.Clear();
 }
Beispiel #14
0
 public void Unregister()
 {
     LunarConsole.UnregisterAction(Invoke);
 }
Beispiel #15
0
 private void RegisterLunar()
 {
     LunarConsole.RegisterAction("Show UI", this.ShowUI);
     LunarConsole.RegisterAction("Hide UI", this.HideUI);
 }
Beispiel #16
0
 public void CloseConsole()
 {
     LunarConsole.Hide();
 }
 void OnDestroy()
 {
     LunarConsole.UnregisterAllActions(this);
 }
Beispiel #18
0
 private void RegisterAction()
 {
     LunarConsole.RegisterAction(m_title, InvokeAction);
 }
Beispiel #19
0
 private void UnregisterAction()
 {
     LunarConsole.UnregisterAction(InvokeAction);
 }
Beispiel #20
0
 public void OpenConsole()
 {
     LunarConsole.Show();
 }