Beispiel #1
0
    void OnDestroy()
    {
        RealTimeRAProcessCenter.terminate();

        Game.terminate();

        SceneViews.terminate();
    }
Beispiel #2
0
    void OnDestroy()
    {
        Game.terminate();

        RealTimeRAProcessCenter.terminate();

        FrameRecording.terminate();

        SceneViews.terminate();
    }
    private static void RefreshSceneObjects()
    {
//        var gcm = (GameManager)Object.FindObjectOfType(typeof(GameManager));
        var objs = Object.FindObjectsOfType(typeof(uFrameComponent));

        //if (gcm != null)
        //    managerId = gcm.gameObject.GetInstanceID();

        SceneViews  = objs.OfType <ViewBase>().ToArray();
        markedViews = SceneViews.Select(p => p.gameObject.GetInstanceID()).ToList();
    }
    private static void HierarchyItemCB(int instanceID, Rect selectionRect)
    {
        if (selectionRect.width < 265)
        {
            return;
        }

        // place the icoon to the right of the list:
        Rect r = new Rect(selectionRect);

        r.x      = r.width - 80;
        r.width  = 75;
        r.height = 16;

        if (instanceID == managerId)
        {
            if (textureGameManager != null)
            {
                GUI.DrawTexture(r, textureGameManager);
            }
            //GUI.Label(r, textureGameManager);
        }
        if (markedGames.Contains(instanceID))
        {
            if (textureSceneManager != null)
            {
                GUI.DrawTexture(r, textureSceneManager);
            }
            // Draw the texture if it's a light (e.g.)
            //GUI.Label(r, textureSceneManager);
        }
        if (markedViews.Contains(instanceID))
        {
            if (textureViewMI != null && textureViewSI != null)
            {
                //GUI.DrawTexture(r, textureView);
                try
                {
                    var viewBase = SceneViews.FirstOrDefault(p => p.gameObject.GetInstanceID() == instanceID);
                    if (viewBase != null)
                    {
                        GUI.DrawTexture(r, textureViewSI);
                    }
                }
                catch (Exception ex)
                {
                    Supress(ex);
                }
            }

            // Draw the texture if it's a light (e.g.)
            //GUI.Label(r, textureView);
        }
    }
    public static void NavigateToFirstView(Type type)
    {
        if (SceneViews == null)
        {
            return;
        }

        var first = SceneViews.FirstOrDefault(p => p.GetType() == type);

        if (first != null)
        {
            NavigateToView(first);
        }
    }
    private static void RefreshSceneObjects()
    {
        var gcm  = (GameManager)Object.FindObjectOfType(typeof(GameManager));
        var objs = Object.FindObjectsOfType(typeof(ViewContainer));

        if (gcm != null)
        {
            managerId = gcm.gameObject.GetInstanceID();
        }

        SceneViews    = objs.OfType <ViewBase>().ToArray();
        markedViews   = SceneViews.Select(p => p.gameObject.GetInstanceID()).ToList();
        SceneManagers = objs.OfType <SceneManager>().ToArray();
        markedGames   = SceneManagers.Select(p => p.gameObject.GetInstanceID()).ToList();
    }
Beispiel #7
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");
    }
Beispiel #8
0
    void OnDestroy()
    {
        LogicEvent.remove(this);

#if FRAME_RECORDING
        FrameRecording.terminate();
#endif

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

        SceneViews.terminate();

        RealTimeRAProcessCenter.terminate();

        Profiler.terminate();

        Game.terminate();

        Debuger.Close();
    }
Beispiel #9
0
    void Awake()
    {
        gameObject.AddComponent <Zeus>();
        gameObject.AddComponent <ResourceManager>();

        RealTimeRAProcessCenter.create();

        Game.create();

        SceneViews.create();

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

        LogicEvent.add("onFBGameNewed", this, "onFBGameNewed");
        LogicEvent.add("onFBGameDestroyed", this, "onFBGameDestroyed");

        LogicEvent.add("onFBGameEnter", this, "onFBGameEnter");
        LogicEvent.add("onFBGameStart", this, "onFBGameStart");
        LogicEvent.add("onFBGameOver", this, "onFBGameOver");
    }
Beispiel #10
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");
    }