Skip to content

Spine Animations

Radomiej edited this page Jun 19, 2016 · 4 revisions

Create GameObject with animations

JGameObject logo3 = Prefabs.createGameObject();
Prefabs.addComponent(logo3, new SpineRenderer("resources/animations/skeleton.json#arrow"));
Prefabs.addComponent(logo3, new Rigidbody());
Prefabs.addComponent(logo3, new RectangleCollider());
Prefabs.addComponent(logo3, new SpineTestComponent());
Prefabs.addComponent(logo3, new Camera());

Create test component set start animation

public class SpineTestComponent extends DefaultComponent {
	
	@Override
	public void start() {
		getGameObject().getComponent(SpineRenderer.class).setAnimation("run", true);
	}
}

Clone this wiki locally