Last active
August 13, 2016 10:17
-
-
Save travisdachi/84811ddf2293ae466534b0b2ebde12a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun attack(target: Target, weapon: Weapon = Fist(), critical: Float = 0.1F) { | |
//... | |
} | |
// <paramName>: <paramType> [= <defaultValue>] | |
val target = getCurrentTarget() | |
attack(target) | |
attack(target, Sword()) | |
attack(target, Bow(), 0.5F) | |
attack(target = target, critical = 0.9f) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment