use of gregtech.common.terminal.app.game.pong.widget.BallWidget in project GregTech by GregTechCEu.
the class PongApp method initApp.
@Override
public AbstractApplication initApp() {
if (isClient) {
paddles = new ArrayList<>();
solidObjects = new ArrayList<>();
this.addWidget(new ImageWidget(5, 5, 333 - 10, 232 - 10, TerminalTheme.COLOR_B_2));
this.addWidget(new ImageWidget(333 / 2 - 4, 5, 6, 232 - 10, new ColorRectTexture(0xAAAAAAAA)));
this.setBall(new BallWidget(333 / 2 - 1, 232 / 2 - 1));
this.addWidget(new SimpleTextWidget(50, 20, "", 0xAAAAAA, () -> String.valueOf(this.getScore(true)), true));
this.addWidget(new SimpleTextWidget(283, 20, "", 0xAAAAAA, () -> String.valueOf(this.getScore(false)), true));
this.initPaddles();
}
return this;
}
Aggregations