public FlashBackState(string ID)
 {
     UIManager = new UIEngine();
     UIManager.AddAndLoad(new Frame());
     UIManager.ActiveFrame.KeyUp+=new KeyEventHandler(ActiveFrame_KeyUp);
     FlashBackSound = new Sound();
     FlashBackSound.CreateSoundInstance(ID);
     FlashBackSound.PlaySound();
     FlashBackBackground = new Sprite(ID, "", 1f, (((Vector2)(Size)DefaultSettings.Settings["WindowSize"])/2f).C2P(), 0f);
 }
        public override void Load()
        {
            MathUtil.Init((float)DefaultSettings.Settings["PixelsPerMeter"]);
            size = ((Vector2)(Size)Utilities.DefaultSettings.Settings["WindowSize"]) / MathUtil.PixelsPerMeter;

            UIManager = new UIEngine();
            GraphicsManager = new GraphicsEngine();
            EditorManager = new EditorEngine();
            ObjectCreator = new StandardObjects();

            EditorManager.Load();
            GraphicsEngine.Load();
            ObjectCreator.Load();

            InitUI();
        }
 // Core Functions
 public ConsoleState()
 {
     _consoleSystem = new UIEngine();
 }
 public void BindToGUIEngine(UIEngine engine)
 {
     if (UIManager != null)
         throw new Exception("Already bound to a GUIEngine");
     UIManager = engine;
 }
        public override void Load()
        {
            ActiveProfile = new PlayerProfile("null");
            MathUtil.Init((float)DefaultSettings.Settings["PixelsPerMeter"]);
            size = ((Vector2)(Size)Utilities.DefaultSettings.Settings["WindowSize"]) / MathUtil.PixelsPerMeter;

            PhysicsManager = new PhysicsEngine();
            UIManager = new UIEngine();
            GraphicsManager = new GraphicsEngine();
            gameLoopFPS = new FPSManager();

            font = (SpriteFont)ContentRepository.Content["Text"];
            //circ = (Texture2D)ContentRepository.Content["Circle"];

            GraphicsEngine.Load();

            InitPhysicsEngine();
            InitUI();
        }
        public override void Load()
        {
            MathUtil.Init((float)DefaultSettings.Settings["PixelsPerMeter"]);
            Size = ((Vector2)(Size)Utilities.DefaultSettings.Settings["WindowSize"]) / MathUtil.PixelsPerMeter;

            PhysicsManager = new PhysicsEngine();
            UIManager = new UIEngine();
            _backGroundMusic = new BackgroundMusic();
            GraphicsEngine.Load();

            FPSCounter = new FPSManager();

            InitGame();
               // InitPhysicsEngine(); <- happens in initGame by map
            InitUI();
        }