Esempio n. 1
0
    void Awake()
    {
        gameObject.AddComponent <ResourceManager>();

        Debuger.SetOutputType(Debuger.OutputType.File);
        Debuger.SetDebugLevel((int)(Debuger.DebugLevel.Logic));

        Game.create();

        RealTimeRAProcessCenter.create();

        FrameRecording.create();

        SceneViews.create();

        LogicEvent.add("onFBGameNewed", this, "onFBGameNewed");
        LogicEvent.add("onFBGameStart", this, "onFBGameStart");
        LogicEvent.add("onFBGameOver", this, "onFBGameOver");
    }
Esempio n. 2
0
    void Awake()
    {
        Debuger.SetOutputType(Debuger.OutputType.Console);
        Debuger.SetDebugLevel((int)(Debuger.DebugLevel.Normal | Debuger.DebugLevel.Warning | Debuger.DebugLevel.Error));
        Debuger.Open();

        Game.create();

        RealTimeRAProcessCenter.create();

        SceneViews.create();

        Profiler.create();

#if !SCENEEDITOR_TOOL
        LuaProxy.create();
#endif

#if FRAME_RECORDING
        FrameRecording.create();
#endif

        LogicEvent.add("onWaitForSync", this, "onWaitForSync");

        //FBGame刚被创建
        LogicEvent.add("onFBGameNewed", this, "onFBGameNewed");
        //FBGame被删除
        LogicEvent.add("onFBGameDestroyed", this, "onFBGameDestroyed");

        //FBGame游戏开始前,比如进场
        LogicEvent.add("onFBGameEnter", this, "onFBGameEnter");
        //FBGame游戏正式开始
        LogicEvent.add("onFBGameStart", this, "onFBGameStart");
        //FBGame游戏结束
        LogicEvent.add("onFBGameOver", this, "onFBGameOver");
    }