Exemplo n.º 1
0
 public override void Attack(Melee unitToAttack)
 {
     //determine health(NEED TO BE OVERHAULED)
     int r = this.strength / unitToAttack.strength;
     unitToAttack.health -= ((20 * (3 * (r) + 1)) / (3 + r));
     this.health -= ((20 * (3 + r)) / ((3 * r) + 1));
     print(this.health);
 }
Exemplo n.º 2
0
        public override void Attack(Melee unitToAttack)
        {
            //determine health(NEED TO BE OVERHAULED)
            int r = this.strength / unitToAttack.strength;

            unitToAttack.health -= ((20 * (3 * (r) + 1)) / (3 + r));
            this.health         -= ((20 * (3 + r)) / ((3 * r) + 1));
            print(this.health);
        }
Exemplo n.º 3
0
 //method to be overode by child class
 public virtual void Attack(Melee unitToAttack)
 {
     //see indivdiual scripts for attack behavior(Melee, Range, etc)
     print("ahhh The Unit version of attack was called: OH NO! Something went hugely wrong");
 }
Exemplo n.º 4
0
 //method to be overode by child class
 public virtual void Attack(Melee unitToAttack)
 {
     //see indivdiual scripts for attack behavior(Melee, Range, etc)
     print("ahhh The Unit version of attack was called: OH NO! Something went hugely wrong");
 }