23 lines
581 B
TypeScript
23 lines
581 B
TypeScript
|
import { _decorator, Component, Node } from 'cc';
|
||
|
import { UmPopupBase } from '../../../cc-common/cc-ui/UmPopupBase';
|
||
|
import { Button } from 'cc';
|
||
|
import { GameGlobalData } from '../global/GameGlobalData';
|
||
|
const { ccclass, property } = _decorator;
|
||
|
|
||
|
@ccclass('GameLoseLayout')
|
||
|
export class GameLoseLayout extends Component {
|
||
|
@property(Button) btnPlay: Button = null!;
|
||
|
|
||
|
protected onLoad(): void {
|
||
|
this.btnPlay?.node.on(Button.EventType.CLICK, this.onBtnReplayClicked, this);
|
||
|
}
|
||
|
|
||
|
onBtnReplayClicked()
|
||
|
{
|
||
|
GameGlobalData.Instance.newGame();
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
|