Пример #1
0
 protected Enemy(string name, Point2D position, Rectangle2D boundingBox, float moveSpeed,
     int health, int armor, double fireResistance, double lightingResistance, double arcaneResistance, 
     double iceResistance, int attackDamage, int attackRange, float attackSpeed, float timeUntilDamageSinceAttack, 
     int experience)
     : base(name, position, boundingBox, moveSpeed, health, armor, fireResistance, lightingResistance, arcaneResistance, iceResistance,
           attackDamage, attackRange, attackSpeed, timeUntilDamageSinceAttack)
 {
     this.Experience = experience;
 }
Пример #2
0
 //This draws the item on the collected items' menu when the item is collected by the character.
 public override void DrawOnTheGameMenu(SpriteBatch spriteBatch, Point2D cameraPoint)
 {
     if (this.IsCollectedByCharacter)
     {
         this.ItemPicture.Position = new Point2D(cameraPoint.X + 2*this.ItemPicture.Texture.Texture.Width, cameraPoint.Y);
         this.ItemPicture.IsActive = true;
         this.BoundingBox = new Rectangle2D((int)this.ItemPicture.Position.X, (int)this.ItemPicture.Position.Y,
             this.ItemPicture.Texture.Texture.Width, this.ItemPicture.Texture.Texture.Height);
         base.DrawOnTheGameMenu(spriteBatch, cameraPoint);
     }
 }
Пример #3
0
 protected Character(string name, Point2D position, Rectangle2D boundingBox, float moveSpeed,
     int health, int armor, double fireResistance, double lightingResistance, double arcaneResistance, double iceResistance,
     int attackDamage, int attackRange, float attackSpeed,
     float timeUntilDamageSinceAttack, int healthOnLevelup, int damageOnLevelUp)
     : base(name, position, boundingBox, moveSpeed, health, armor, fireResistance, lightingResistance, arcaneResistance, iceResistance,
           attackDamage, attackRange, attackSpeed, timeUntilDamageSinceAttack)
 {
     this.Experience = 0;
     this.CurrentLevel = 1;
     this.CollectedItems = new List<IItem>();
     this.Levels = ConstantLevels.CharacterLevels();
     this.HealthOnLevelUp = healthOnLevelup;
     this.DamageOnLevelUp = damageOnLevelUp;
 }
Пример #4
0
 protected AttackingGameObject(string name, Point2D position, Rectangle2D boundingBox, float moveSpeed,
      int health, int armor, double fireResistance, double lightingResistance, 
      double arcaneResistance, double iceResistance,
      int attackDamage, int attackRange, float attackSpeed, float timeUntilDamageSinceAttack)
     : base(name, position, boundingBox)
 {
     this.AttackDamage = attackDamage;
     this.AttackRange = attackRange;
     this.AttackSpeed = attackSpeed;
     this.TimeUntilDamageSinceAttack = timeUntilDamageSinceAttack;
     this.MaxHealth = health;
     this.Health = health;
     this.Armor = armor;
     this.FireResistance = fireResistance;
     this.LightingResistance = lightingResistance;
     this.ArcaneResistance = arcaneResistance;
     this.IceResistance = iceResistance;
     this.Bar = new Sprite("Sprites\\Bars\\Bar", this.Position);
     this.Bar.IsActive = true;
     this.MoveSpeed = moveSpeed;
 }
Пример #5
0
 protected AnimatedGameObject(string name, Point2D position, Rectangle2D boundingBox)
     : base(name, position)
 {
     this.BoundingBox = boundingBox;
     this.AnimationSpeed = Constant.DefaultAnimationSpeed;
 }
Пример #6
0
 public LevelChanger(string name, Point2D position, Rectangle2D boundingBox, int newLevelIndex)
     : base(name, position)
 {
     this.NewLevelIndex = newLevelIndex;
     this.BoundingBox = boundingBox;
 }
Пример #7
0
 public Button(Rectangle2D buttonLocation)
 {
     this.ButtonLocation = buttonLocation;
 }