public override void Spawn( TimeSpan gameTime, TanksDrop game ) { Concealer c = new Concealer( lifeTime ); c.Initialize( game ); c.spawnTime = gameTime; game.QueueEntity( c ); }
public override void Spawn( TimeSpan gameTime, TanksDrop game ) { Random r = new Random(); BlackHole hole = new BlackHole(); Game = game; hole.Initialize( game ); hole.LoadContent( game.Content, game.ScreenWidth, game.ScreenHeight ); hole.Position = hole.RandomPosition(); hole.Controller = new BlackHoleController( hole.Position, hole ); hole.Controller.Initialize( game ); hole.VacuumSpeed = 0; hole.spawnTime = gameTime; hole.lifeTime = 10000; Game.AppendController( hole.Controller ); Game.QueueEntity( hole ); }
public override void Spawn( TimeSpan gameTime, TanksDrop game ) { Random r = new Random(); Portal redPortal = new Portal( lifeTime ); Portal bluePortal = new Portal( lifeTime ); redPortal.isRed = true; redPortal.Initialize( game ); bluePortal.Initialize( game ); redPortal.Position = new Vector2( r.Next( game.ScreenWidth ), r.Next( game.ScreenHeight ) ); bluePortal.Position = new Vector2( r.Next( game.ScreenWidth ), r.Next( game.ScreenHeight ) ); redPortal.LoadContent( game.Content, game.ScreenWidth, game.ScreenHeight ); bluePortal.LoadContent( game.Content, game.ScreenWidth, game.ScreenHeight ); redPortal.otherPortal = bluePortal; bluePortal.otherPortal = redPortal; redPortal.spawnTime = bluePortal.spawnTime = gameTime; game.QueueEntity( redPortal, bluePortal ); }