furred npc test might delete later

This commit is contained in:
minjaesong
2019-05-20 12:07:01 +09:00
parent 471b0c805d
commit 92d5cac2ff
60 changed files with 306 additions and 91 deletions

View File

@@ -11,12 +11,17 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
*/
interface HasAssembledSprite {
/** ADL path for main sprite. Necessary. */
var animDescPath: String
/** ADL path for glow sprite. Optional. */
var animDescPathGlow: String?
// FIXME sometimes the animmation is invisible (row and nFrames mismatch -- row is changed to 1 but it's drawing 3rd frame?)
fun reassembleSprite(sprite: SpriteAnimation) {
fun reassembleSprite(sprite: SpriteAnimation, spriteGlow: SpriteAnimation? = null) {
_rebuild(ADProperties(Gdx.files.internal(animDescPath).read()), sprite)
if (spriteGlow != null)
_rebuild(ADProperties(Gdx.files.internal(animDescPathGlow).read()), spriteGlow)
}
/*fun rebuild(animDescPath: String, spriteAnimation: SpriteAnimation) {