Skip to content

Instantly share code, notes, and snippets.

@codetravis
Created December 20, 2016 13:41
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/94709bd135371dfa91d7af9d1e54ba11 to your computer and use it in GitHub Desktop.
Save codetravis/94709bd135371dfa91d7af9d1e54ba11 to your computer and use it in GitHub Desktop.
8.9 Add ProjectileType to Character
Import fantomX
Import projectile_type
Class Character
Field box:ftObject
Field current_health:Int
Field max_health:Int
Field is_player:Bool
' Add projectile type
Field projectile_type:ProjectileType
Method New(box:ftObject, health:Int=1, player:Bool=False, projectile_type:ProjectileType)
Self.box = box
Self.current_health = health
Self.max_health = health
Self.is_player = player
' Set initial projectile type
Self.projectile_type = projectile_type
End
'...................
End
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment