Beispiel #1
0
 public static void onplan(DogBrain brain)
 {
     brain.plantime = random.Next(50, 300);
     int dir = random.Next(0, 4);
     switch (dir)
     {
         case 0:
             brain.mob.physobj.vel = new Vector2(0, 8);
             break;
         case 1:
             brain.mob.physobj.vel = new Vector2(0, -8);
             break;
         case 2:
             brain.mob.physobj.vel = new Vector2(8, 0);
             break;
         case 3:
             brain.mob.physobj.vel = new Vector2(-8, 0);
             break;
     }
 }
Beispiel #2
0
            public static void onplan(DogBrain brain)
            {
                brain.plantime = random.Next(50, 300);
                int dir = random.Next(0, 4);

                switch (dir)
                {
                case 0:
                    brain.mob.physobj.vel = new Vector2(0, 8);
                    break;

                case 1:
                    brain.mob.physobj.vel = new Vector2(0, -8);
                    break;

                case 2:
                    brain.mob.physobj.vel = new Vector2(8, 0);
                    break;

                case 3:
                    brain.mob.physobj.vel = new Vector2(-8, 0);
                    break;
                }
            }
Beispiel #3
0
 public Enemy(PhysicsObject pho, DrawingObject dro)
     : base(pho, dro)
 {
     brain = new DogBrain(this);
     brain.curplan = AIMode.bounce;
 }
Beispiel #4
0
 public Enemy(PhysicsObject pho, DrawingObject dro)
     : base(pho, dro)
 {
     brain         = new DogBrain(this);
     brain.curplan = AIMode.bounce;
 }