freeplay menu polish thingie
This commit is contained in:
@ -4,6 +4,11 @@ import flixel.FlxSprite;
|
||||
|
||||
class HealthIcon extends FlxSprite
|
||||
{
|
||||
/**
|
||||
* Used for FreeplayState! If you use it elsewhere, prob gonna annoying
|
||||
*/
|
||||
public var sprTracker:FlxSprite;
|
||||
|
||||
public function new(char:String = 'bf', isPlayer:Bool = false)
|
||||
{
|
||||
super();
|
||||
@ -32,4 +37,12 @@ class HealthIcon extends FlxSprite
|
||||
animation.play(char);
|
||||
scrollFactor.set();
|
||||
}
|
||||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
super.update(elapsed);
|
||||
|
||||
if (sprTracker != null)
|
||||
setPosition(sprTracker.x + sprTracker.width + 10, sprTracker.y - 30);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user