This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

MrCohen
MrCohen presents ...

2018/11/19

AnimatedCharacter

This is OLD. The newer one has a lot more features and an actual API:
https://www.greenfoot.org/scenarios/25667

This scenario uses System.nanoTime to produce smooth, time-based movement and animation (rather than act-based). It also uses images created by Spritefoot to demonstrate how you can use multiple arrays of images to smoothly manage animation. You should grab SpriteFoot and use it to slice up Sprites for use in this program. You could use your own sprites, too, if you follow the naming convention.

Instructions:
- SHIFT - Run
- SPACE BAR - Attack
- Arrow keys to move OR
- Click mouse to try click-to-move functionality

4532 views / 3295 in the last 7 days

3 votes | 0 in the last 7 days

Tags: with-source animation sprite

open in greenfoot
Your browser does not support the canvas tag.
A new version of this scenario was uploaded on 2018-11-21 17:42:46 UTC Now supports setLocation used as normal.
Heet_PatelHeet_Patel

2018/11/23

THIS IS GR8!!!!! GR8 GAME. ADD MORE OBJECTS IF YOU CAN. MAKE GAME MORE INTERESTING
A new version of this scenario was uploaded on 2019-05-23 17:49:35 UTC
A new version of this scenario was uploaded on 2019-10-22 13:22:35 UTC
A new version of this scenario was uploaded on 2019-10-23 12:27:12 UTC Improved commenting to make it easier to follow.
A new version of this scenario was uploaded on 2020-01-17 13:38:16 UTC Vastly improved organization. Now allows for as many named animations as the programmer wants. "Terminal animations" have been added - these are animations that are intended to be run a finite number of times before returning tot he base (movement) animation. For example, press space bar and the player will run an attack animation and then return to his base movement animations.
A new version of this scenario was uploaded on 2020-01-17 13:40:32 UTC
A new version of this scenario was uploaded on 2020-01-17 13:54:14 UTC
A new version of this scenario was uploaded on 2020-01-21 16:41:39 UTC Cleaned up Player to make it easier to understand. Improved comments and documentation to be accurate and up to date. This is my last update on this for a while, but your bug reports and feedback are still welcome.
A new version of this scenario was uploaded on 2020-04-23 12:32:46 UTC More fixes...

See all comments

Want to leave a comment? You must first log in.

Who likes this?

tonyx zombzthewd Heet_Patel