Exemplo n.º 1
0
        public void createLifes()
        {
            this.pLifeGroup = (ShipLifeGroup)GameObjectMan.Find(GameObject.Name.ShipLifeGroup);
            SpriteBatch pSB_Lifes = SpriteBatchMan.Find(SpriteBatch.Name.Lifes);
            SpriteBatch pSB_Boxes = SpriteBatchMan.Find(SpriteBatch.Name.Boxes);

            Ship  pShip;
            float startX = 40.0f;
            float startY = 30.0f;
            float gap    = 60.0f;

            for (int i = 0; i < this.lifeRemain; i++)
            {
                pShip = new Ship(GameObject.Name.Ship, GameSprite.Name.Ship, startX, startY);
                pShip.activateGameSprite(pSB_Lifes);
                pShip.activateCollisionSprite(pSB_Boxes);
                this.pLifeGroup.add(pShip);
                startX += gap;
            }
        }