Added flipX and flipY to loadSpriteFromXML() (#487)
Fixes #478 * Added flipX and flipY to loadSpriteFromXML() why was this not already implemented? Nevermind I'm pretty sure it's because parseBool isn't a thing * WHOOPS gotta update my heckin repo * Wow neo is good at simplifying stuff rip parseBool but HAXE MAKE IT A THING * sigma ¯\_(ツ)_/¯ * Allow for flipx and flipy as opposed to flipX and flipY (cammel text) * gaming chair 🪑 --------- Co-authored-by: ⍚~Nex <87421482+NexIsDumb@users.noreply.github.com>
This commit is contained in:
@@ -143,6 +143,8 @@ class XMLUtil {
|
||||
var graphicSizey:Null<Int> = Std.parseInt(node.att.graphicSizey);
|
||||
if (graphicSizey.isNotNull()) spr.setGraphicSize(0, graphicSizey);
|
||||
}
|
||||
if (node.has.flipX) spr.flipX = node.att.flipX == "true";
|
||||
if (node.has.flipY) spr.flipY = node.att.flipY == "true";
|
||||
if (node.has.updateHitbox && node.att.updateHitbox == "true") spr.updateHitbox();
|
||||
|
||||
if (node.has.zoomfactor)
|
||||
@@ -392,4 +394,4 @@ typedef BeatAnim = {
|
||||
|
||||
interface IXMLEvents {
|
||||
public function onPropertySet(property:String, value:Dynamic):Void;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user