Created
January 5, 2017 13:09
-
-
Save secretdataz/28835470eca1eead2973216ee626b231 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import greenfoot.*; | |
/** | |
* Simple actor that automatically loads a GIF as its idle animation. | |
* | |
* @author Jittapan Pluemsumran | |
* @version 0.1 | |
*/ | |
public class GifActor extends Actor | |
{ | |
private GifImage gif; | |
public GifActor(String file) { | |
gif = new GifImage(file); | |
} | |
public void act() { | |
setImage(gif.getCurrentImage()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment