Exemplo n.º 1
0
        public static Enemy CreateWanderer(Vector2 position)
        {
            var enemy = new Enemy(Art.Wanderer, position);
            enemy.AddBehaviour(enemy.MoveRandomly());

            return enemy;
        }
Exemplo n.º 2
0
        public static Enemy CreateSeeker(Vector2 position)
        {
            var enemy = new Enemy(Art.Seeker, position);
            enemy.AddBehaviour(enemy.FollowPlayer(0.9f));
            enemy.PointValue = 2;

            return enemy;
        }
Exemplo n.º 3
0
 public void HandleCollision(Enemy other)
 {
     var d = Position - other.Position;
     Velocity += 10 * d / (d.LengthSquared + 1);
 }