Пример #1
0
 public Wife()
 {
     this.Position = new Vector2(ScreenManager.Instance.Dimensions.X/10, ScreenManager.Instance.Dimensions.Y/2);
     this.Sprites = new SpriteSheet[1];
     this.Sprites[0] = new SpriteSheet(1, 2, Position, DefaultWifePath);
     this.Sprites[0].LoadContent(ScreenManager.Instance.Content);
     this.LastAction = new TimeSpan();
     this.MaxHealth = 2000;
     this.Health = 2000;
     this.IsAlive = true;
     this.Armor = 0;
     this.healthBar = new HealthBar(this.Position);
     this.BoundingBox = new Rectangle((int)this.Position.X - 16, (int)this.Position.Y - 16,
     (int)this.Sprites[0].FrameDimensions.X / 2, (int)this.Sprites[0].FrameDimensions.Y / 2);
 }
Пример #2
0
 protected Enemy(Vector2 position, string path, int movementSpeed, int health, int weaponRange, int armor, int damage, int attackRate)
 {
     this.path = path;
     this.Position = position;
     this.Sprites = new SpriteSheet[3];
     this.MovementSpeed = movementSpeed;
     this.AttackRate = attackRate;
     this.MaxHealth = health;
     this.Health = health;
     this.Armor = armor;
     this.Damage = damage;
     this.WeaponRange = weaponRange;
     this.IsAlive = true;
     this.LastAction = new TimeSpan();
     this.LastTimeDamageTaken = new TimeSpan();
     this.healthBar = new HealthBar(this.Position);
 }
Пример #3
0
 public Player(int movementSpeed, int weaponRange, int health, int armor, int damage, int attackRate)
 {
     this.Position = new Vector2((int)(ScreenManager.Instance.Dimensions.X / 6), (int)(ScreenManager.Instance.Dimensions.Y / 2));
     this.Sprites = new SpriteSheet[3];
     this.IsAlive = true;
     this.AttackRate = attackRate;
     this.MovementSpeed = movementSpeed;
     this.WeaponRange = weaponRange;
     this.MaxHealth = health;
     this.Health = health;
     this.Armor = armor;
     this.Damage = damage;
     this.LastAction = new TimeSpan();
     this.LastTimeDamageTaken = new TimeSpan();
     this.HealthBar = new HealthBar(new Vector2(this.Position.X, this.Position.Y - 40));         
     this.Items = new List<IItem>();  
 }