public Missile ActivateMissile() { // copy over safe copy Missile pMissile = new Missile(GameObject.Name.Missile, Sprite.Name.Missile, 400, 100); this.pMissile = pMissile; // Attach to GameObjectManager - {update and collisions} GameStateManager.GetGame().GetStateGameObjectManager().Attach(pMissile); // Attached to SpriteBatches SpriteBatch pMissile_SpriteBatch = GameStateManager.GetGame().GetStateSpriteBatchManager().Find(SpriteBatch.Name.Missile); SpriteBatch pCollisionBox_SpriteBatch = GameStateManager.GetGame().GetStateSpriteBatchManager().Find(SpriteBatch.Name.CollisionBox); pMissile.ActivateSprite(pMissile_SpriteBatch); pMissile.ActivateCollisionSprite(pCollisionBox_SpriteBatch); // Attach the missile to the missile root GameObject pMissileGroup = GameStateManager.GetGame().GetStateCompositeManager().Find(Composite.CompositeName.MissileGroup); Debug.Assert(pMissileGroup != null); // Add to Composite pMissileGroup.Add(this.pMissile); return(this.pMissile); }