예제 #1
0
    public IEnumerator MenuRoutine()
    {
        yield return(CoUtils.RunTween(GetComponent <CanvasGroup>().DOFade(1.0f, 0.8f)));

        Global.Instance().Input.PushListener("pause", (cmd, ev) => {
            if (ev != InputManager.Event.Up)
            {
                return(true);
            }
            if (cmd == InputManager.Command.Quit)
            {
                Application.Quit();
            }
            if (cmd == InputManager.Command.Confirm)
            {
                StartCoroutine(DieRoutine());
            }
            if (cmd == InputManager.Command.Debug)
            {
                lua.Initialize();
                StartCoroutine(lua.RunRoutine(new LuaScript(lua, fixitScript.luaString), true));
                StartCoroutine(DieRoutine());
            }
            return(true);
        });
    }
예제 #2
0
 private void RunScene()
 {
     StartCoroutine(lua.RunRoutine(new LuaScript(lua, script.luaString), true));
 }