예제 #1
0
파일: Melee.cs 프로젝트: hybrid1969/CivGrid
 public override void Attack(Range 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);
 }
예제 #2
0
파일: Unit.cs 프로젝트: hybrid1969/CivGrid
 //method to be overode by child class
 public virtual void Attack(Range 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");
 }