2025-02-17 21:36:37 +08:00
|
|
|
import { _decorator, Button, Component, Label, Node } from 'cc';
|
|
|
|
import { GameManager } from './GameManager';
|
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
|
|
@ccclass('GameOverScreen')
|
|
|
|
export class GameOverScreen extends Component {
|
|
|
|
|
|
|
|
@property(Label)
|
|
|
|
gameResult: Label | null =null;
|
|
|
|
|
|
|
|
|
|
|
|
// @property(Button)
|
|
|
|
// gameStart:Button | null = null;
|
|
|
|
|
|
|
|
// @property(GameManager)
|
|
|
|
// gameCtrl:GameManager | null = null;
|
|
|
|
|
|
|
|
start() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// public setGameStart(){
|
|
|
|
// this.gameCtrl!.RestGame();
|
|
|
|
// }
|
|
|
|
|
|
|
|
public setResult(isWin:boolean){
|
|
|
|
if(isWin){
|
|
|
|
this.gameResult!.string = "胜利!";
|
|
|
|
}else{
|
|
|
|
this.gameResult!.string = "失败!";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
update(deltaTime: number) {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|