本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.ui.Image.getActions方法的典型用法代码示例。如果您正苦于以下问题:Java Image.getActions方法的具体用法?Java Image.getActions怎么用?Java Image.getActions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.scenes.scene2d.ui.Image
的用法示例。
在下文中一共展示了Image.getActions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shouldParseSpriteView
import com.badlogic.gdx.scenes.scene2d.ui.Image; //导入方法依赖的package包/类
@Test
@NeedGL
public void shouldParseSpriteView() throws Exception {
CocoStudioUIEditor editor = new CocoStudioUIEditor(
Gdx.files.internal("animation/MainScene.json"), null, null, null, null);
Group group = editor.createGroup();
Image image = group.findActor("st_2");
Array<Action> actions = image.getActions();
assertThat(actions.size, is(1));
RepeatAction repeatAction = (RepeatAction) actions.get(0);
ParallelAction parallelAction = (ParallelAction) repeatAction.getAction();
assertThat(parallelAction.getActions().size, is(3));
assertThat(parallelAction.getActions(), (Matcher) everyItem(instanceOf(SequenceAction.class)));
SequenceAction moveAction = (SequenceAction) parallelAction.getActions().get(0);
SequenceAction scaleAction = (SequenceAction) parallelAction.getActions().get(1);
assertThat(moveAction.getActions().size, is(4));
assertThat(moveAction.getActions(), (Matcher) everyItem(instanceOf(MoveToAction.class)));
assertThat(scaleAction.getActions().size, is(4));
assertThat(scaleAction.getActions(), (Matcher) everyItem(instanceOf(ScaleToAction.class)));
}