public GameObject Create(GameObject.Name name, MissileCategory.Type type, float posX = 0.0f, float posY = 0.0f) { GameObject pGameObj = null; switch (type) { case MissileCategory.Type.Missile: pGameObj = new Missile(GameSprite.Name.Sprite_Missle, name, posX, posY); break; case MissileCategory.Type.Missile_Grid: pGameObj = new MissileGrid(name); break; default: // something is wrong Debug.Assert(false); break; } // add it to the gameObjectManager Debug.Assert(pGameObj != null); //GameObjectMan.Attach(pGameObj); // Attached to Group pGameObj.ActivateGameSprite(this.pSpriteBatch); pGameObj.ActivateCollisionSprite(this.pBoxBatch); return(pGameObj); }
public MissileCategory(GameObject.Name gameName, GameSprite.Name spriteName, MissileCategory.Type mt) : base(gameName, spriteName) { this.type = mt; }
protected MissileCategory(GameObject.Name name, GameSprite.Name spriteName, int index, MissileCategory.Type missileType) : base(name, spriteName, index) { this.type = missileType; }