public World() { drugsBoat = new DrugsBoat(new Vector2(200, 150)); policeStation = new PoliceStation(); spawnPoint = new Vector2(600, 580); policeStation.createBoat(new PoliceBoat(spawnPoint)); dangerLevel = 1; busted = new Busted(new Vector2(0, 0)); bustedTime = 0; }
public World() { _gameobjects.Add(new Package(new Vector2(Game1.Instance.Random.Next(0, 100), Game1.Instance.Random.Next(150, 250)))); _gameobjects.Add(new Package(new Vector2(Game1.Instance.Random.Next(0, 100), Game1.Instance.Random.Next(450, 550)))); _gameobjects.Add(new Package(new Vector2(Game1.Instance.Random.Next(200, 300), Game1.Instance.Random.Next(0, 100)))); _gameobjects.Add(new Package(new Vector2(Game1.Instance.Random.Next(200, 300), Game1.Instance.Random.Next(450, 550)))); _gameobjects.Add(new Package(new Vector2(Game1.Instance.Random.Next(400, 500), Game1.Instance.Random.Next(350, 450)))); _gameobjects.Add(new Package(new Vector2(Game1.Instance.Random.Next(400, 500), Game1.Instance.Random.Next(150, 250)))); _gameobjects.Add(new Package(new Vector2(Game1.Instance.Random.Next(600, 700), Game1.Instance.Random.Next(450, 550)))); _gameobjects.Add(new Package(new Vector2(Game1.Instance.Random.Next(600, 700), Game1.Instance.Random.Next(250, 350)))); _gameobjects.Add(_drugsBoat = new DrugsBoat(new Vector2(100, 100))); _gameobjects.Add(new PoliceBoat(new Vector2(600, 580), _drugsBoat)); }
public PoliceBoat(Vector2 position, DrugsBoat d) : base(position) { state = new Floating(this); drugsBoat = d; PoliceStation.Register(this); Texture = AssetsManager.Policeboat; Origin = new Vector2(Texture.Width / 2, Texture.Height / 2); Rotation = MathHelper.ToRadians(45); Speed = new Vector2(2, 2); AggSpeed = new Vector2(4, 4); if (Game1.Instance.Random.NextDouble() < 0.5) { Direction = new Vector2(1, -1); } else { Direction = new Vector2(-1, -1); } }