예제 #1
0
        public static void Init()
        {
            // Game Layer
            mapRoot = new LevelParent();
            cache   = new Dictionary <string, Level>();
            initial = true;
            //currentLevelPath = null;
            currentLevel  = null;
            previousLevel = currentLevel;

            // UI Layer
            pausedText       = new TextShadowEntity(new Vector2(340, 540), "Paused", Color.White);
            pausedText.State = EntityStates.Disabled;

            deadText       = new TextShadowEntity(new Vector2(340, 540), "Defeat", Color.White);
            deadText.State = EntityStates.Disabled;

            winText       = new TextShadowEntity(new Vector2(340, 540), "Victory", Color.White);
            winText.State = EntityStates.Disabled;

            retryDialog = new RetryDialog();
            //retryDialog.State = EntityStates.Disabled;

            // UI Backdrop
            backdrop = new Backdrop();
            Scene.Add(backdrop);
            var backdropTransform = backdrop.GetComponent <Transform>();

            backdropTransform.AddChild(mapRoot);

            // Debug
            showFPS = false;
        }