|
@@ -220,9 +220,16 @@ export class GameDetailLayer extends BaseUI implements GameTaskItemCallback {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
async startSpin() {
|
|
|
+ if (!this.data) {
|
|
|
+ Tips.show("Please wait for the game data to load");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!this.data.gameId) {
|
|
|
+ Tips.show("Game id not found");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
if (this.data.currentSpin <= 0) {
|
|
|
return;
|
|
|
}
|
|
@@ -297,8 +304,7 @@ export class GameDetailLayer extends BaseUI implements GameTaskItemCallback {
|
|
|
this.setText("lbl_game_spin_times", "x" + this.data.currentSpin + "");
|
|
|
this.FindAs("btn_start_spin", Sprite).grayscale =
|
|
|
this.data.currentSpin <= 0;
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
this.FindAs("btn_start_spin_10", Sprite).grayscale =
|
|
|
this.data.currentSpin < 10;
|
|
|
}
|