Guest User

Untitled

a guest
Jan 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.01 KB | None | 0 0
  1.     /// <summary>
  2.     /// A slow moving, mindless zombie.
  3.     /// </summary>
  4.     public class Zombie : Enemy
  5.     {
  6.         /// <summary>
  7.         /// Initializes a new instance of the <see cref="Zombie"/> class.
  8.         /// </summary>
  9.         /// <param name="dungeon">The dungeon.</param>
  10.         /// <param name="room">The dungeon room the entity is in.</param>
  11.         public Zombie(Dungeon dungeon, DungeonRoom room)
  12.             : base(dungeon, room)
  13.         {
  14.             this.AddComponent(new BoundsComponent(32, 32));
  15.             this.AddComponent(new SpriteComponent(@"Textures\zombie"));
  16.             this.AddComponent(new EnemyMovementComponent(dungeon, room, 150f, 30f, MathHelper.Pi, 1f, MovementPattern.Wander, MovementType.Walk));
  17.             this.GetComponent<EnemyMovementComponent>().Steering.WanderRadius = 50f;
  18.             this.GetComponent<EnemyMovementComponent>().Steering.WanderDistance = 16f;
  19.             this.AddComponent(new EnemyAIComponent(room, EnemyAIType.Aggressive));
  20.         }
  21.     }
Add Comment
Please, Sign In to add comment