예제 #1
0
 public Boolean doesHit(Character target)
 {
     //check target's distance, check your attack range. see if intersects; if so return true
     return false;
 }
예제 #2
0
 //Way you access CombatController
 //CombatController combat = CombatController.Instance;
 ////Then you could call the setMainCharacter function defined above
 //combat.setMainCharacter(player);
 public void confirmedHit(Character attacker, Character defender)
 {
     defender.takeDamage(damageFormula(attacker,defender));
 }
예제 #3
0
 public int damageFormula(Character attacker, Character target)
 {
     int damage=attacker.strength - target.defense;
     if (damage < 1) damage = 1;
     return damage;
 }
예제 #4
0
 public static void hit(Character attacker, Character defender)
 {
 }