public static void DropBomb() { UFOManager ufoMan = UFOManager.GetInstance(); UFO ufo = ufoMan.pUFO; PCSTree pcsTree = GameObjectManager.GetRootTree(); Debug.Assert(pcsTree != null); Bomb pBomb = new Bomb(GameObjectName.UFOBomb, SpriteBaseName.UFOBomb, new FallStraight(), ufo.x, ufo.y, 0); pBomb.pProxySprite.pSprite.SetColor(ColorFactory.Create(ColorName.Red).pAzulColor); ufoMan.pBomb = pBomb; SpriteBatch sbAliens = SpriteBatchManager.Find(SpriteBatchName.Aliens); SpriteBatch sbBoxes = SpriteBatchManager.Find(SpriteBatchName.Boxes); pBomb.ActivateCollisionSprite(sbBoxes); pBomb.ActivateGameSprite(sbAliens); GameObject pBombRoot = GameObjectManager.Find(GameObjectName.BombRoot); Debug.Assert(pBombRoot != null); pcsTree.Insert(ufoMan.pBomb, pBombRoot); SetUFOBombActive(true); Debug.WriteLine("UFO Bomb dropped!"); }