use of var3d.net.center.shaderActor.WaterActor in project var3dframe by Var3D.
the class StageTest method init.
@Override
public void init() {
// 设置背景
setBackground(R.image.bg);
// 设置标题
txt_logo = game.getLabel(R.strings.logo).setColor(Color.BLUE).setStroke(Color.CYAN).setPosition(getWidth() / 2, getHeight() - 20, Align.top).setAlpha(0.9f).touchOff().show();
// Tost
btn_tost = game.getButton(R.image.pause_btn_bg).setPosition(0, 380).addClicAction().show();
btn_tost.add(game.getLabel(R.strings.tost).getActor());
btn_tost.addListener(new ClickListener() {
public void clicked(InputEvent event, float x, float y) {
game.setUserData(DialogMessge.MODEL, new DialogMessge.Model("这是一个Tost范例"));
game.showDialog(DialogMessge.class);
}
});
// 自定义对话框
btn_dialog = game.getButton(R.image.pause_btn_bg).setPosition(0, 320).addClicAction().show();
btn_dialog.add(game.getLabel(R.strings.dialogTitle).getActor());
btn_dialog.addListener(new ClickListener() {
public void clicked(InputEvent event, float x, float y) {
game.showDialog(DialogTest.class);
}
});
// shader测试
WaterActor waterActor = game.getUI(new WaterActor(game.getTextureRegion(R.image.badlogic))).show(Align.center);
OutLineActor outLineActor = game.getUI(new OutLineActor(game.getTextureRegion(R.image.tank_4))).setPosition(getWidth() / 2, waterActor.getY() - 10, Align.top).show();
}
Aggregations