Skip to content

Instantly share code, notes, and snippets.

@codetravis
Created December 21, 2016 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codetravis/94576cba7d5d3e87d2231e470db4410b to your computer and use it in GitHub Desktop.
Save codetravis/94576cba7d5d3e87d2231e470db4410b to your computer and use it in GitHub Desktop.
8.11 Projectile type, add rate of fire
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