Skip to content

Commit

Permalink
ADD hsprite.fromTile
Browse files Browse the repository at this point in the history
  • Loading branch information
deepnight committed Dec 11, 2024
1 parent 352e28f commit 2267308
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/dn/heaps/slib/HSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ class HSprite extends h2d.Drawable implements SpriteInterface {
setEmptyTexture();
}

public static function fromTile(t:h2d.Tile, ?parent:h2d.Object) : HSprite {
var s = new HSprite(parent);
s.useCustomTile(t);
return s;
}

override function toString() return "HSprite_"+groupName+"["+frame+"]";

inline function get_anim() {
Expand Down

0 comments on commit 2267308

Please sign in to comment.