Example #1
0
 public Player(Vector2 newPosition, String newName)
 {
     //texture = newTexture;
     position = newPosition;
     health = 100;
     sensor = new Sensor(100, 3);
     //rectangle = new Rectangle((int)position.X, (int)position.Y, texture.Width, texture.Height);
     rectangle = new Rectangle((int)position.X, (int)position.Y, 50, 50);
     name = newName;
     rightHand = new Weapon("Sword", 20, new int[3] { 2, 3, 4 });
     leftHand = new Weapon("Shield", 0, new int[0] { });
 }
Example #2
0
 public NPC(Texture2D newTexture, Vector2 newPosition, String newName)
 {
     texture = newTexture;
     position = newPosition;
     name = newName;
     sensor = new Sensor(300, 3);
     rectangle = new Rectangle((int)position.X, (int)position.Y, texture.Width, texture.Height);
     health = 100;
     maxHealth = 100;
     strength = 10;
     defense = 5;
     isAlive = true;
     isHostile = false;
 }
Example #3
0
 public NPC(Vector2 newPosition, String newName, Node spawnNode)
 {
     position = newPosition;
     name = newName;
     sensor = new Sensor(300, 3);
     //rectangle = new Rectangle((int)position.X, (int)position.Y, texture.Width, texture.Height);
     rectangle = new Rectangle((int)position.X, (int)position.Y, 50, 50);
     location = spawnNode;
     health = 100;
     maxHealth = 100;
     strength = 10;
     defense = 5;
     isAlive = true;
     isHostile = false;
 }