Skip to content

Instantly share code, notes, and snippets.

@travisdachi
Last active August 13, 2016 10:17
Show Gist options
  • Save travisdachi/2d28d27e30b0894ba8c85bcd18c7ecc7 to your computer and use it in GitHub Desktop.
Save travisdachi/2d28d27e30b0894ba8c85bcd18c7ecc7 to your computer and use it in GitHub Desktop.
public void attack(Target target) {
attack(target, new Fist());
}
public void attack(Target target, Weapon weapon) {
attack(target, weapon, 0.1f);
}
public void attack(Target target, Weapon weapon, float critical) {
//...
}
Target target = getCurrentTarget();
attack(target);
attack(target, new Sword());
attack(target, new Bow(), 0.5f);
attack(target, new Fist(), 0.9f);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment