Example #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);
 }
Example #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);
        }
Example #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");
 }
Example #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");
 }