예제 #1
0
 public void Register()
 {
     if (m_name != null && m_componentMethodName != null)
     {
         LunarConsole.RegisterAction(m_name, Invoke);
     }
 }
예제 #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);
        }
예제 #3
0
    void OnDestroy()
    {
        LunarConsole.UnregisterAllActions(this);

        LunarVariables.dragSensitivity.RemoveDelegate(ChangeDragSensitivity);
        LunarVariables.debug.RemoveDelegate(ChangeDebugMode);
    }
예제 #4
0
    void OnDestroy()
    {
        LunarConsole.UnregisterAllActions(this);

        LunarVariables.combineDuration.RemoveDelegate(SetCellCombineDuration);
        LunarVariables.combineInterval.RemoveDelegate(SetCellCombineInterval);
    }
예제 #5
0
    void Start()
    {
        LunarConsole.RegisterAction("Theme A", ChangeThemeA);
        LunarConsole.RegisterAction("Thene B", ChangeThemeB);

        LunarVariables.dragSensitivity.AddDelegate(ChangeDragSensitivity);
        LunarVariables.debug.AddDelegate(ChangeDebugMode);
    }
예제 #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);
    }
예제 #7
0
    // 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));
        });
    }
예제 #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);
     }
 }
예제 #9
0
    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;
    }
예제 #10
0
 public void EnableConsole()
 {
     LunarConsole.SetConsoleEnabled(true);
 }
예제 #11
0
 public void DisableConsole()
 {
     LunarConsole.SetConsoleEnabled(false);
 }
예제 #12
0
 public void ShowConsole()
 {
     LunarConsole.Show();
 }
예제 #13
0
 public void ClearConsole()
 {
     LunarConsole.Clear();
 }
예제 #14
0
 public void Unregister()
 {
     LunarConsole.UnregisterAction(Invoke);
 }
예제 #15
0
 private void RegisterLunar()
 {
     LunarConsole.RegisterAction("Show UI", this.ShowUI);
     LunarConsole.RegisterAction("Hide UI", this.HideUI);
 }
예제 #16
0
 public void CloseConsole()
 {
     LunarConsole.Hide();
 }
예제 #17
0
 void OnDestroy()
 {
     LunarConsole.UnregisterAllActions(this);
 }
예제 #18
0
 private void RegisterAction()
 {
     LunarConsole.RegisterAction(m_title, InvokeAction);
 }
예제 #19
0
 private void UnregisterAction()
 {
     LunarConsole.UnregisterAction(InvokeAction);
 }
예제 #20
0
 public void OpenConsole()
 {
     LunarConsole.Show();
 }