Created
December 21, 2016 14:12
-
-
Save codetravis/94576cba7d5d3e87d2231e470db4410b to your computer and use it in GitHub Desktop.
8.11 Projectile type, add rate of fire
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
Import fantomX | |
Class ProjectileType | |
Field power:Int | |
Field range:Float | |
Field acceleration:Float | |
Field max_speed:Float | |
' Add rate of fire | |
Field rate_of_fire:Float | |
' and also add to constructor | |
Method New(power:Int=1, range:Float=1000, acceleration:Float=0, max_speed:Float=200, rate_of_fire:Float=2.0) | |
Self.power = power | |
Self.range = range | |
Self.acceleration = acceleration | |
Self.max_speed = max_speed | |
Self.rate_of_fire = rate_of_fire | |
End | |
End |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment