HealthIcon
| Kind | class |
| Package | objects |
| Full name | objects.HealthIcon |
| Source | source/objects/HealthIcon.hx |
| Extends | FlxSprite |
Public fields
| Name | Type | Static | Default | Notes |
|---|---|---|---|---|
sprTracker | FlxSprite | no | — | — |
canBounce | Bool | no | false | — |
iconOffsets | Array<Float> | no | [0, 0] | — |
Public methods
new (constructor)
function new(char:String = 'bf', isPlayer:Bool = false, allowGPU:Bool = true)
| Parameter | Type | Default |
|---|---|---|
char (optional) | String | 'bf' |
isPlayer (optional) | Bool | false |
allowGPU (optional) | Bool | true |
changeIcon
function changeIcon(char:String)
| Parameter | Type | Default |
|---|---|---|
char | String | — |
bounce
function bounce()
playAnim
function playAnim(anim:String)
| Parameter | Type | Default |
|---|---|---|
anim | String | — |
getCharacter
function getCharacter():String
Internals
Private / internal members
| Field | Type | Static |
|---|---|---|
isPlayer | Bool | no |
char | String | no |
initialWidth | Float | no |
initialHeight | Float | no |
_placeholderIcons | Map<String, FlxGraphic> | yes |
| Method |
|---|
override function update(elapsed:Float) |
override function updateHitbox() |
static function getPlaceholderIcon(char:String):FlxGraphic |