Exemplo n.º 1
0
        void OnDestroy()
        {
            m_LevelEditorWindow = null;

            if (!EditorApplication.currentScene.Contains("PoolGame"))
            {
                return;
            }

            foreach (KeyValuePair <int, TouchObject> k in m_Balls)
            {
                if (k.Value.texture)
                {
                    Resources.UnloadAsset(k.Value.texture);
                }
            }

            foreach (var v in m_Pockets)
            {
                v.Clear();
            }

            RemoveObject();
            AreaWidth  = 0;
            AreaHeight = 0;
            XSize      = 0;
            YSize      = 0;

            ShowStandardBalls();
        }
Exemplo n.º 2
0
 static void Init()
 {
     if (m_LevelEditorWindow == null)
     {
         m_LevelEditorWindow = (CustomLevelEditor)EditorWindow.GetWindow(typeof(CustomLevelEditor), false, "Level editor");
     }
     m_LevelEditorWindow.Show();
 }
        void OnDestroy()
        {
            m_LevelEditorWindow = null;

            if (!EditorApplication.currentScene.Contains("PoolGame"))
                return;

            foreach (KeyValuePair<int, TouchObject> k in m_Balls)
            {
                if (k.Value.texture)
                {
                    Resources.UnloadAsset(k.Value.texture);
                }
            }

            foreach(var v in m_Pockets)
            {
                v.Clear();
            }

            RemoveObject();
            AreaWidth = 0;
            AreaHeight = 0;
            XSize = 0;
            YSize = 0;

            ShowStandardBalls();
        }
 static void Init()
 {
     if (m_LevelEditorWindow == null)
         m_LevelEditorWindow = (CustomLevelEditor)EditorWindow.GetWindow(typeof(CustomLevelEditor), false, "Level editor");
     m_LevelEditorWindow.Show();
 }