private void CreateNewHunter(int Size, Vector2 Position) { HunterShip NewShip = new HunterShip(GraphicsDevice); NewShip.Height = Size; NewShip.Width = Size; if ((Position.X == -1) && (Position.Y == -1)) { NewShip.TopLeft.X = -1 * NewShip.Width; NewShip.TopLeft.Y = -1 * NewShip.Height; } else { NewShip.TopLeft.X = Position.X; NewShip.TopLeft.Y = Position.Y; } NewShip.TargetObject = cPlayerShip; NewShip.MaxDistanceFromTarget = 150 + (75 * cRandom.Next(1, 5)); NewShip.MinDistanceFromTarget = (NewShip.MaxDistanceFromTarget / 2) + 25; NewShip.Image = cTextureDict[Textures.Hunter]; NewShip.Tint = Color.White; NewShip.BulletManager = cEnemyBullets; NewShip.BulletTexture = cTextureDict[Textures.Bullet]; cUFOs.AddParticle(NewShip); }
private void CreateNewHunter(int Size, Vector2 Position) { HunterShip NewShip = new HunterShip(); NewShip.Height = Size; NewShip.Width = Size; if ((Position.X == -1) && (Position.Y == -1)) { NewShip.TopLeft.X = -1 * NewShip.Width; NewShip.TopLeft.Y = -1 * NewShip.Height; } else { NewShip.TopLeft.X = Position.X; NewShip.TopLeft.Y = Position.Y; } NewShip.TargetObject = cPlayerShip; NewShip.MaxDistanceFromTarget = 150 + (75 * cRandom.Next(1, 5)); NewShip.MinDistanceFromTarget = (NewShip.MaxDistanceFromTarget / 2) + 25; NewShip.Image = cTextureDict[Textures.Hunter]; NewShip.Tint = Color.White; NewShip.BulletManager = cEnemyBullets; NewShip.BulletTexture = cTextureDict[Textures.Bullet]; cUFOs.AddParticle(NewShip); }