public Group createPuls(float x, float y){
grPuls = new Group();
Texture txt = managerAssets.getAssetsTutorial().getTexture(NameFiles.circlePulsTutorial);
Image image = new Image(new TextureRegion(txt));
Vector2 crop = Scaling.fit.apply(txt.getWidth(),txt.getHeight(),WIDTH,HEIGHT);
image.setSize(crop.x * 0.135f, crop.y * 0.135f);
image.setPosition(x, y);
grPuls.addActor(image);
txt = managerAssets.getAssetsTutorial().getTexture(NameFiles.PulsCircleScalable);
Image puls = new Image(new TextureRegion(txt));
crop = Scaling.fit.apply(txt.getWidth(),txt.getHeight(),WIDTH,HEIGHT);
puls.setPosition(image.getRight() - image.getWidth() / 2, image.getTop() - image.getHeight() / 2);
puls.setSize(1, 1);
MoveToAction move = new MoveToAction();
move.setDuration(1);
move.setPosition(image.getRight() - image.getWidth() / 2 - crop.x*0.085f, image.getTop() - image.getHeight() / 2 - crop.y*0.085f);
MoveToAction mo = new MoveToAction();
mo.setDuration(0);
mo.setPosition(image.getRight() - image.getWidth() / 2, image.getTop() - image.getHeight() / 2);
ScaleToAction scale = new ScaleToAction();
scale.setScale(WIDTH*0.17f);
scale.setDuration(1);
ScaleToAction sc = new ScaleToAction();
sc.setDuration(0);
sc.setScale(0);
RepeatAction repeat = new RepeatAction();
repeat.setCount(RepeatAction.FOREVER);
repeat.setAction(new SequenceAction(scale, sc));
puls.addAction(repeat);
RepeatAction r = new RepeatAction();
r.setCount(RepeatAction.FOREVER);
r.setAction(new SequenceAction(move, mo));
puls.addAction(r);
grPuls.addActor(puls);
return grPuls;
}
TutorialDialog.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:enklave
作者:
评论列表
文章目录