Created
December 20, 2016 13:41
-
-
Save codetravis/94709bd135371dfa91d7af9d1e54ba11 to your computer and use it in GitHub Desktop.
8.9 Add ProjectileType to Character
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 | |
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