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 void OnCollision(ICollidable gameObject) { if (gameObject is IObserver) { } else { PoliceStation.Notify(); // Notify (); // Game1.Instance._world.AddPolice (); } }
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); } }