public void DoAttack(Human target = null, float targetDistance = -1) { if (target != null) { if (targetDistance >= 0) { if (targetDistance <= weapon.GetDamageRange()) { if (weapon.isCoolDown) { if (target.Hp > 0) { target.GetDamage(weapon); } else { Debug.Log("Target :" + target.characterBehavior.display() + " is dead !"); } } else { Debug.Log(characterBehavior.display() + "'s weapon is cooling"); } } } } else { Debug.Log("Target == null"); } }
public void changeProfession(CharacterBehavior newCharacterBehavior) { characterBehavior = newCharacterBehavior; Debug.Log("Change to " + characterBehavior.display()); }