loading player from json file

This commit is contained in:
minjaesong
2021-08-28 16:31:06 +09:00
parent 29cccea19b
commit b84a0a770b
31 changed files with 308 additions and 145 deletions

View File

@@ -18,6 +18,16 @@ interface HasAssembledSprite {
// FIXME sometimes the animmation is invisible (row and nFrames mismatch -- row is changed to 1 but it's drawing 3rd frame?)
/**
* Example usage:
* ```
* this.animDescPath = "..."
* this.animDescPathGlow = "..."
* this.sprite = SpriteAnimation(actor)
* this.spriteGlow = SpriteAnimation(actor)
* reassembleSprite(this.sprite, this.spriteGlow)
* ```
*/
fun reassembleSprite(sprite: SpriteAnimation, spriteGlow: SpriteAnimation? = null) {
_rebuild(ADProperties(Gdx.files.internal(animDescPath).read()), sprite)
if (animDescPathGlow != null && spriteGlow != null)