Closed MrGru closed 10 years ago
Sorry I found getTime() and setTime(int ). (is this right?) I have error when my scml file in the same folder with image (it doesn't have name attribute in folder tag in scml file). and when run it has error: Element folder doesn't have attribute or child: name.
and when I use player.setAnimation: some animations have error with my scml file (I send link to download it for you, can you check it for me. Thanks. Here is my scml file: http://www.mediafire.com/download/mo9j20h4hqhcb07/samurai.rar Exception in thread "LWJGL Application" java.lang.NullPointerException at com.brashmonkey.spriter.Animation.update(Animation.java:94) at com.brashmonkey.spriter.Player.update(Player.java:51) at com.brashmonkey.spriter.Player.setAnimation(Player.java:287) at com.brashmonkey.spriter.Player.setAnimation(Player.java:294) at com.brashmonkey.spriter.tests.AnimationSwitchTest$AnimationSwitcher.touchDown(AnimationSwitchTest.java:49)
Yes setTime and getTime are the correct methods. I also encountered the same problem with sprites in the same folder as the scml file. I already fixed it, but did not push it. In the meantime just change line 80 in SCMLReader.java to: Folder folder = new Folder(repo.getInt("id"), repo.get("name", "")); (https://github.com/Trixt0r/spriter/blob/master/Spriter/src/com/brashmonkey/spriter/SCMLReader.java#L80)
How can I set and get current frame in new Lib. These methods are greate in the old lib.
More changes. Thank you very much.