Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions source/funkin/game/HealthIcon.hx
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,7 @@ class HealthIcon extends FunkinSprite
else if (node.exists("offsety"))
offsetY = Std.parseFloat(node.get("offsety")).getDefault(0);

addOffset(animName, offsetX, offsetY);

addAnim(animName, node.get("anim"), Std.parseInt(node.get("fps")).getDefault(24), false); // don't allow looping for transitions
addAnim(animName, node.get("anim"), Std.parseInt(node.get("fps")).getDefault(24), false, null, null, offsetX, offsetY); // don't allow looping for transitions
if (animateAtlas == null && animation.exists(animName))
animation.getByName(animName).flipX = isPlayer != iconIsPlayer;
case "anim":
Expand Down Expand Up @@ -265,15 +263,13 @@ class HealthIcon extends FunkinSprite
else if (node.exists("offsety"))
offsetY = Std.parseFloat(node.get("offsety")).getDefault(0);

addOffset(animName, offsetX, offsetY);

var looped:Bool = false;
if (node.exists("looped"))
looped = node.get("looped").toLowerCase() == "true";
else if (node.exists("loop"))
looped = node.get("loop").toLowerCase() == "true";

addAnim(animName, node.get("anim"), Std.parseInt(node.get("fps")).getDefault(24), looped);
addAnim(animName, node.get("anim"), Std.parseInt(node.get("fps")).getDefault(24), looped, null, null, offsetX, offsetY);
if (animateAtlas == null && animation.exists(animName))
animation.getByName(animName).flipX = isPlayer != iconIsPlayer;
case "step":
Expand Down Expand Up @@ -457,4 +453,4 @@ enum abstract TrackerAlignment(Int) {
* Mathematically: `tracker.x + tracker.width`
*/
var RIGHT = 2;
}
}