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