added example animation

This commit is contained in:
Sem van der Hoeven
2020-05-10 21:24:34 +02:00
parent cca7e4262c
commit de587b55c6
2 changed files with 4 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -1,4 +1,4 @@
package netwerkprog.game; package temp;
import com.badlogic.gdx.ApplicationListener; import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
@@ -8,6 +8,9 @@ import com.badlogic.gdx.graphics.g2d.Animation;
import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.graphics.g2d.TextureRegion;
/**
* code got from https://github.com/libgdx/libgdx/wiki/2D-Animation
*/
public class Animator implements ApplicationListener { public class Animator implements ApplicationListener {
// Constant rows and columns of the sprite sheet // Constant rows and columns of the sprite sheet