Exemplo n.º 1
0
 static public int Setup(IntPtr l)
 {
     try {
         mg.org.Keyboard self = (mg.org.Keyboard)checkSelf(l);
         self.Setup();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 2
0
        static void __Setup()
        {
            m_appBhv = ComponentUtil.EnsureComponent <CCAppBhv>(m_gRoot);

            if (!m_trash)
            {
                m_trash = GameObjUtil.CreateGameobj("Trash");
                GameObjUtil.DontDestroyOnLoad(m_trash);
                m_trash.transform.position = new Vector3(-1000, -1000, -1000);
                m_trash.isStatic           = true; //设置为静态对象
            }


            m_resMgr = m_resMgr ?? new ResMgr();
            m_resMgr.Setup();

            m_soundMgr = m_soundMgr ?? new SoundMgr(m_gRoot);
            m_soundMgr.Setup();

            m_keyboard.Setup();

            m_classPools = ClassPools.me;

            //
            TimerMgr.inst.Setup();
            //
            ActionMgr.inst.Setup();
            //
            UserPrefs.Setup();

            if (CCDefine.DEBUG)
            {
                //显示帧频
                ComponentUtil.EnsureComponent <FpsTicker>(m_gRoot);
            }


            LogFile.Run();
        }