public void CreateAllSpriteBatches(GraphicsDevice graphicsDev)
        {
            SpriteBatch spriteBatch  = new SpriteBatch(graphicsDev);
            DrawBatch   Sprite_Batch = new DrawBatch(spriteBatch, graphicsDev, SpriteSortMode.FrontToBack, BlendState.AlphaBlend, SpriteBatchName.Collisions);

            SpriteBatchManager.getInstance().Add(Sprite_Batch);

            spriteBatch  = new SpriteBatch(graphicsDev);
            Sprite_Batch = new DrawBatch(spriteBatch, graphicsDev, SpriteSortMode.Deferred, BlendState.AlphaBlend, SpriteBatchName.Shields);
            SpriteBatchManager.getInstance().Add(Sprite_Batch);

            spriteBatch  = new SpriteBatch(graphicsDev);
            Sprite_Batch = new DrawBatch(spriteBatch, graphicsDev, SpriteSortMode.Deferred, BlendState.AlphaBlend, SpriteBatchName.Scene);
            SpriteBatchManager.getInstance().Add(Sprite_Batch);

            spriteBatch  = new SpriteBatch(graphicsDev);
            Sprite_Batch = new DrawBatch(spriteBatch, graphicsDev, SpriteSortMode.Deferred, BlendState.AlphaBlend, SpriteBatchName.Start);
            SpriteBatchManager.getInstance().Add(Sprite_Batch);

            spriteBatch  = new SpriteBatch(graphicsDev);
            Sprite_Batch = new DrawBatch(spriteBatch, graphicsDev, SpriteSortMode.Deferred, BlendState.AlphaBlend, SpriteBatchName.GameOver);
            SpriteBatchManager.getInstance().Add(Sprite_Batch);

            spriteBatch  = new SpriteBatch(graphicsDev);
            Sprite_Batch = new DrawBatch(spriteBatch, graphicsDev, SpriteSortMode.Deferred, BlendState.AlphaBlend, SpriteBatchName.Credit);
            SpriteBatchManager.getInstance().Add(Sprite_Batch);

            spriteBatch  = new SpriteBatch(graphicsDev);
            Sprite_Batch = new DrawBatch(spriteBatch, graphicsDev, SpriteSortMode.Deferred, BlendState.AlphaBlend, SpriteBatchName.UI);
            SpriteBatchManager.getInstance().Add(Sprite_Batch);

            spriteBatch  = new SpriteBatch(graphicsDev);
            Sprite_Batch = new DrawBatch(spriteBatch, graphicsDev, SpriteSortMode.Deferred, BlendState.AlphaBlend, SpriteBatchName.Player);
            SpriteBatchManager.getInstance().Add(Sprite_Batch);
        }
Beispiel #2
0
 public ColObj(Rectangle inRect, ColObjName inCName, SpriteName inSName)
 {
     Name       = inCName;
     rect       = inRect;
     _ColSprite = new ColSprite(Rectangle.Empty, new Vector2(1, 1), 0.0f, 1.0f, inSName);
     if (_ColSprite != null)
     {
         SpriteBatchManager.getInstance().Find(SpriteBatchName.Collisions).Add(_ColSprite);
     }
 }
        static public SpriteBatchManager getInstance()
        {
            if (Instance == null)
            {
                Instance = new SpriteBatchManager();
                return(Instance);
            }

            return(Instance);
        }
        public Alien CreateAliens(Rectangle inRect, SpriteName inSName, NodeName inColGrName, int score)
        {
            TextureSprite Text    = new TextureSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, inSName);
            ColObj        _colobj = new ColObj(inRect, ColObjName.Crab, SpriteName.BBox);
            Alien         Obj     = new Alien(GameObjName.Alien, _colobj, new Vector2(inRect.X, inRect.Y), Text, score);

            ColObjManager.getInstance().Add(_colobj);
            SpriteBatchManager.getInstance().Find(SpriteBatchName.Scene).Add(Text);

            return(Obj);
        }
        public void Create(Rectangle inRect)
        {
            Rectangle tempRect = inRect;
            bool      toDraw   = false;;

            for (int i = 0; i < 10; ++i)
            {
                for (int j = 0; j < 10; j++)
                {
                    if (i != 7 && i != 8 && i != 9)
                    {
                        toDraw = true;
                    }
                    else
                    if (j != 3 && j != 4 && j != 5 && j != 6)
                    {
                        toDraw = true;
                    }

                    if ((i == 0 && j == 0) || (i == 0 && j == 9))
                    {
                        toDraw = false;
                    }
                    if ((i == 0 && j == 1) || (i == 0 && j == 8))
                    {
                        toDraw = false;
                    }
                    if ((i == 1 && j == 0) || (i == 1 && j == 9))
                    {
                        toDraw = false;
                    }

                    if (toDraw)
                    {
                        TextureSprite inSprite = new TextureSprite(tempRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.ShieldPart);
                        ColObj        _colobj  = new ColObj(tempRect, ColObjName.ShieldPart, SpriteName.BBox);
                        ShieldPart    Obj      = new ShieldPart(GameObjName.ShieldPart, _colobj, new Vector2(tempRect.X, tempRect.Y), inSprite);
                        ColObjManager.getInstance().Add(_colobj);
                        SpriteBatchManager.getInstance().Find(SpriteBatchName.Shields).Add(inSprite);
                        GameObjMananger.getInstance().Add(Obj);

                        ShieldParts.Add(Obj);
                    }

                    tempRect.X += 10;
                    toDraw      = false;
                }
                tempRect.X  = inRect.X;
                tempRect.Y += 10;
            }
        }
Beispiel #6
0
        public void Kill(ColObj inObj)
        {
            SpriteBatchName inSpName = SpriteBatchName.Collisions;

            GameSprite _gameSprite = inObj.getColSprite();

            SpriteBatchManager.getInstance().Kill(_gameSprite, inSpName);
            ListNode KillNode = Find(inObj);

            if (KillNode != null)
            {
                List.Remove(KillNode);
            }
        }
        public void Initialize(GraphicsDeviceManager graphics, SpriteBatch spritebatch)
        {
            TextureManager.getInstance().Initialize();
            TextureManager.getInstance().CreateGameTextures();

            SoundManager.getInstance().Initialize();
            SoundManager.getInstance().CreateSounds();

            ImageManager.getInstance().Initialize();
            ImageManager.getInstance().CreateGameImages();

            SpriteManager.getInstance().Initialize();
            SpriteManager.getInstance().CreateAllSprites();

            AnimationManager.getInstance().Initialize();
            AnimationManager.getInstance().CreateAnimations();

            SpriteBatchManager.getInstance().Initialize();
            SpriteBatchManager.getInstance().CreateAllSpriteBatches(graphics.GraphicsDevice);
            SpriteBatchManager.getInstance().CreateMenu(graphics.GraphicsDevice);

            ColObjManager.getInstance().Initialize();
            GameObjMananger.getInstance().Initialize();

            ColGroupManager.getInstance().Initialize();
            ColGroupManager.getInstance().Create();

            ColPairManager.getInstance().Initialize();
            ColPairManager.getInstance().CreateCollisionPairs();

            GameObjMananger.getInstance().CreateSuper();
            GameObjMananger.getInstance().CreateLevel(graphics.GraphicsDevice);
            GameObjMananger.getInstance().CreateShield();
            GameObjMananger.getInstance().CreateShip();
            GameObjMananger.getInstance().CreateUI();
            GameObjMananger.getInstance().CreateUfo();

            InputManager.Instance().Initialize();
            TimeEventManager.getInstance().Initialize();
            TimeEventManager.getInstance().StartTimedEvents();

            ScreenManager.Instance().CurrentScreen = Screen.MainMenu;
            ScreenManager.Instance().switchScreen();

            getCurrentPlayerData();

            CurrLevel  = 0;
            Difficulty = CurrLevel * 2;
        }
Beispiel #8
0
        public void switchScreen()
        {
            switch (CurrentScreen)
            {
            case Screen.MainMenu:
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Shields).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Scene).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Collisions).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.GameOver).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Credit).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Player).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Start).Activate();
                break;

            case Screen.Game:
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Shields).Activate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Scene).Activate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Collisions).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.GameOver).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Credit).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Start).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Player).DeActivate();
                break;

            case Screen.Player:
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Shields).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Scene).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Collisions).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.GameOver).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Credit).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Start).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Player).Activate();
                break;

            case Screen.GameOver:
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Shields).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Scene).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Collisions).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.GameOver).Activate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Credit).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Start).DeActivate();
                SpriteBatchManager.getInstance().Find(SpriteBatchName.Player).DeActivate();
                break;
            }
        }
        public Ship CreateShip()
        {
            Rectangle inRect = new Rectangle(476, 715, 58, 32);

            TextureSprite Text    = new TextureSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Ship);
            ColObj        _colobj = new ColObj(inRect, ColObjName.Ship, SpriteName.BBox);
            Ship          Obj     = new Ship(GameObjName.Ship, _colobj, new Vector2(inRect.X, inRect.Y), Text, ColGroupName.Ship);

            ColObjManager.getInstance().Add(_colobj);
            SpriteBatchManager.getInstance().Find(SpriteBatchName.Scene).Add(Text);
            ColGroupManager.getInstance().find(ColGroupName.Ship).Add(Obj);

            GameObjMananger.getInstance().Add(Obj);

            this.CreateMissile(new Rectangle(inRect.X + inRect.Width / 2 - 10 / 2, inRect.Y - 2, 10, 16));

            return(Obj);
        }
        public Lives CreateLives()
        {
            Rectangle     inRect = new Rectangle(0, 0, 48, 32);
            TextureSprite Life   = new TextureSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Ship);
            Lives         _Lives = new Lives(GameObjName.Life, new Vector2(75, 760), Life);

            SpriteBatchManager.getInstance().Find(SpriteBatchName.Scene).Add(Life);

            GameObjMananger.getInstance().Add(_Lives);

            inRect = new Rectangle(0, 0, 48, 32);
            Life   = new TextureSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Ship);
            _Lives = new Lives(GameObjName.Life, new Vector2(145, 760), Life);
            SpriteBatchManager.getInstance().Find(SpriteBatchName.Scene).Add(Life);

            GameObjMananger.getInstance().Add(_Lives);

            return(_Lives);
        }
        public UFO CreateUfo()
        {
            Rectangle inRect = new Rectangle(-70, 120, 95 / 2, 46 / 2);

            TextureSprite Text    = new TextureSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Ufo);
            ColObj        _colobj = new ColObj(inRect, ColObjName.UFO, SpriteName.BBox);

            ColObjManager.getInstance().Add(_colobj);
            UFO Obj = new UFO(GameObjName.UFO, _colobj, new Vector2(inRect.X, inRect.Y), Text, 100);

            SpriteBatchManager.getInstance().Find(SpriteBatchName.Scene).Add(Text);

            ColGroup Invaders = ColGroupManager.getInstance().find(ColGroupName.Ufo);

            Invaders.Add(Obj);

            GameObjMananger.getInstance().Add(Obj);

            return(Obj);
        }
        public void KillObject(GameObj inObj, SpriteBatchName inSpName)
        {
            GameSprite _gameSprite = inObj.getGameSprite();

            if (_gameSprite != null)
            {
                SpriteBatchManager.getInstance().Kill(_gameSprite, inSpName);
            }

            ColObj _colObj = inObj.getColObj();

            if (_colObj != null)
            {
                ColObjManager.getInstance().Kill(_colObj);
            }

            ColGroup _ColGroup = ColGroupManager.getInstance().find(inObj.TempColGroupName);

            _ColGroup.Kill(inObj);

            Kill(inObj);
        }
        public Bomb CreateBomb(Rectangle inRect)
        {
            TextureSprite Text    = new TextureSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Bomb);
            ColObj        _colobj = new ColObj(inRect, ColObjName.Missile, SpriteName.BBox);
            Bomb          Obj     = new Bomb(GameObjName.Missile, _colobj, new Vector2(inRect.X, inRect.Y), Text, ColGroupName.Bomb);

            ColGroup X = ColGroupManager.getInstance().find(Obj.TempColGroupName);

            if (X == null)
            {
                ColGroupManager.getInstance().find(ColGroupName.Bomb);
            }

            ColObjManager.getInstance().Add(_colobj);
            SpriteBatchManager.getInstance().Find(SpriteBatchName.Scene).Add(Text);

            ColGroupManager.getInstance().find(Obj.TempColGroupName).Add(Obj);

            GameObjMananger.getInstance().Add(Obj);

            return(Obj);
        }
        public Missile CreateMissile(Rectangle inRect)
        {
            TextureSprite Text    = new TextureSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Missile);
            ColObj        _colobj = new ColObj(inRect, ColObjName.Missile, SpriteName.BBox);
            Missile       Obj     = new Missile(GameObjName.Missile, _colobj, new Vector2(inRect.X, inRect.Y), Text, ColGroupName.Missile);

            ColGroup X = ColGroupManager.getInstance().find(Obj.TempColGroupName);

            if (X == null)
            {
                ColGroupManager.getInstance().find(ColGroupName.Missile);
            }

            ColObjManager.getInstance().Add(_colobj);
            SpriteBatchManager.getInstance().Find(SpriteBatchName.Scene).Add(Text);

            ColGroupManager.getInstance().find(Obj.TempColGroupName).Add(Obj);

            GameObjMananger.getInstance().Add(Obj);
            Obj.setStatus(false);
            ((Ship)(GameObjMananger.getInstance().Find(GameObjName.Ship))).setMissile(Obj);

            return(Obj);
        }
        void getGameInput()
        {
            KBState = Keyboard.GetState();
            GPState = GamePad.GetState(PIndex);

            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || KBState.IsKeyDown(Keys.Escape))
            {
                ScreenManager.Instance().CurrentScreen = Screen.GameOver;
                GameManager.getInstance().Hit();
                GameManager.getInstance().Hit();
                GameManager.getInstance().Hit();
                ScreenManager.Instance().switchScreen();
            }


            if (GameManager.getInstance().getCurrentPlayerStatus() == playerStatus.Live)
            {
                if (KBState.IsKeyDown(Keys.Up) || GPState.IsButtonDown(Buttons.DPadUp))
                {
                    if (!isStillPressed(Inputs.Up))
                    {
                        _InputSequence.Add(Inputs.Up);
                    }
                }

                if (KBState.IsKeyDown(Keys.Down) || GPState.IsButtonDown(Buttons.DPadDown))
                {
                    if (!isStillPressed(Inputs.Down))
                    {
                        _InputSequence.Add(Inputs.Down);
                    }
                }

                ////////////////////Movement////////////////////
                if (KBState.IsKeyDown(Keys.Left) || GPState.IsButtonDown(Buttons.DPadLeft))
                {
                    Ship Player = (Ship)GameObjMananger.getInstance().Find(GameObjName.Ship);
                    Player.MoveLeft();
                }

                if (KBState.IsKeyDown(Keys.Right) || GPState.IsButtonDown(Buttons.DPadRight))
                {
                    Ship Player = (Ship)GameObjMananger.getInstance().Find(GameObjName.Ship);
                    Player.MoveRight();
                }
                ///////////////////////////////////////////////////


                if (GPState.IsButtonDown(Buttons.RightShoulder))
                {
                    _InputSequence.Add(Inputs.RightBumper);
                }

                if (GPState.IsButtonDown(Buttons.LeftShoulder))
                {
                    if (!isStillPressed(Inputs.LeftBumper))
                    {
                        _InputSequence.Add(Inputs.LeftBumper);
                    }
                }

                if (KBState.IsKeyDown(Keys.B) || GPState.IsButtonDown(Buttons.B))
                {
                    if (!isStillPressed(Inputs.B))
                    {
                        _InputSequence.Add(Inputs.B);
                    }
                }

                if (KBState.IsKeyDown(Keys.X) || GPState.IsButtonDown(Buttons.X) || KBState.IsKeyDown(Keys.Space))
                {
                    if (!isStillPressed(Inputs.X) && !isStillPressed(Inputs.Space))
                    {
                        ((Ship)GameObjMananger.getInstance().Find(GameObjName.Ship)).ShootMissile();
                    }
                }
            }


            if (KBState.IsKeyDown(Keys.Y) || GPState.IsButtonDown(Buttons.Y))
            {
                if (!isStillPressed(Inputs.Y))
                {
                    if (SpriteBatchManager.getInstance().Find(SpriteBatchName.Collisions).isActive())
                    {
                        SpriteBatchManager.getInstance().Find(SpriteBatchName.Collisions).DeActivate();
                    }
                    else if (!SpriteBatchManager.getInstance().Find(SpriteBatchName.Collisions).isActive())
                    {
                        SpriteBatchManager.getInstance().Find(SpriteBatchName.Collisions).Activate();
                    }
                }
            }

            PrevKBState = KBState;
            PrevGPState = GPState;
        }
Beispiel #16
0
 protected override void Draw(GameTime gameTime)
 {
     GraphicsDevice.Clear(Color.Black);
     SpriteBatchManager.getInstance().Draw();
     base.Draw(gameTime);
 }
        public UI CreateUI()
        {
            Rectangle  inRect = new Rectangle(825, 0, 100, 100);
            FontSprite Text   = new FontSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Score_Font, "SCORE<2>");
            UI         Obj    = new UI(GameObjName.None, new Vector2(inRect.X, inRect.Y), Text);

            SpriteBatchManager.getInstance().Find(SpriteBatchName.UI).Add(Text);

            GameObjMananger.getInstance().Add(Obj);

            inRect = new Rectangle(875, 35, 100, 100);
            Text   = new FontSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Score_Val, "0000");
            Obj    = new UI(GameObjName.Score, new Vector2(inRect.X, inRect.Y), Text);

            SpriteBatchManager.getInstance().Find(SpriteBatchName.UI).Add(Text);

            GameObjMananger.getInstance().Add(Obj);


            inRect = new Rectangle(25, 0, 100, 100);
            Text   = new FontSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Score_Font, "SCORE<1>");
            Obj    = new UI(GameObjName.None, new Vector2(inRect.X, inRect.Y), Text);

            SpriteBatchManager.getInstance().Find(SpriteBatchName.UI).Add(Text);

            GameObjMananger.getInstance().Add(Obj);

            inRect = new Rectangle(75, 35, 100, 100);
            Text   = new FontSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Score_Val, "0000");
            Obj    = new UI(GameObjName.Score, new Vector2(inRect.X, inRect.Y), Text);

            SpriteBatchManager.getInstance().Find(SpriteBatchName.UI).Add(Text);

            GameObjMananger.getInstance().Add(Obj);


            inRect = new Rectangle(400, 0, 100, 100);
            Text   = new FontSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Score_Font, "HI-SCORE");
            Obj    = new UI(GameObjName.None, new Vector2(inRect.X, inRect.Y), Text);

            SpriteBatchManager.getInstance().Find(SpriteBatchName.UI).Add(Text);

            GameObjMananger.getInstance().Add(Obj);

            inRect = new Rectangle(450, 35, 100, 100);
            Text   = new FontSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.HIScore_Val, "0000");
            Obj    = new UI(GameObjName.HiScore, new Vector2(inRect.X, inRect.Y), Text);

            SpriteBatchManager.getInstance().Find(SpriteBatchName.UI).Add(Text);

            GameObjMananger.getInstance().Add(Obj);


            inRect = new Rectangle(25, 750, 100, 100);
            Text   = new FontSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Score_Font, "2");
            Obj    = new UI(GameObjName.LivesUI, new Vector2(inRect.X, inRect.Y), Text);

            SpriteBatchManager.getInstance().Find(SpriteBatchName.Scene).Add(Text);

            GameObjMananger.getInstance().Add(Obj);


            inRect = new Rectangle(1024 - 300, 750, 100, 100);
            Text   = new FontSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Score_Font, "CREDITS");
            Obj    = new UI(GameObjName.None, new Vector2(inRect.X, inRect.Y), Text);

            SpriteBatchManager.getInstance().Find(SpriteBatchName.UI).Add(Text);

            GameObjMananger.getInstance().Add(Obj);

            inRect = new Rectangle(1024 - 100, 750, 100, 100);
            Text   = new FontSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Score_Font, "0");
            Obj    = new UI(GameObjName.None, new Vector2(inRect.X, inRect.Y), Text);

            SpriteBatchManager.getInstance().Find(SpriteBatchName.UI).Add(Text);

            GameObjMananger.getInstance().Add(Obj);


            inRect = new Rectangle(1024 / 2 - 75, 800 / 2 - 100, 100, 100);
            Text   = new FontSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Score_Font, "PUSH");
            Obj    = new UI(GameObjName.None, new Vector2(inRect.X, inRect.Y), Text);

            SpriteBatchManager.getInstance().Find(SpriteBatchName.Player).Add(Text);

            GameObjMananger.getInstance().Add(Obj);

            inRect = new Rectangle(1024 / 2 - 250, 800 / 2 - 50, 100, 100);
            Text   = new FontSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Score_Font, "1 OR 2 PLAYERS BUTTON");
            Obj    = new UI(GameObjName.None, new Vector2(inRect.X, inRect.Y), Text);

            SpriteBatchManager.getInstance().Find(SpriteBatchName.Player).Add(Text);

            inRect = new Rectangle(1024 / 2 - 100, 800 / 2 - 50, 100, 100);
            Text   = new FontSprite(inRect, new Vector2(1, 1), 0.0f, 1.0f, SpriteName.Score_Font, "GAME OVER");
            Obj    = new UI(GameObjName.None, new Vector2(inRect.X, inRect.Y), Text);


            this.CreateLives();


            SpriteBatchManager.getInstance().Find(SpriteBatchName.GameOver).Add(Text);

            GameObjMananger.getInstance().Add(Obj);

            return(Obj);
        }