Example usage for com.badlogic.gdx.scenes.scene2d.actions RotateToAction setRotation

List of usage examples for com.badlogic.gdx.scenes.scene2d.actions RotateToAction setRotation

Introduction

In this page you can find the example usage for com.badlogic.gdx.scenes.scene2d.actions RotateToAction setRotation.

Prototype

public void setRotation(float rotation) 

Source Link

Usage

From source file:com.spaceapps.liftoffgame.screens.GameScreen.java

public void rocketCrashAnimation() {
    MoveToAction action = Actions.action(MoveToAction.class);
    action.setPosition(420, 0);//from  w w w  .  j  ava  2 s. c o m
    action.setDuration(1f);
    game.rocket.addAction(action);

    RotateToAction action2 = Actions.action(RotateToAction.class);
    action2.setRotation(-180f);
    action2.setDuration(1f);
    game.rocket.addAction(action2);
}