12345678910111213141516171819 |
- import { _decorator, Button, Component, Node, director } from 'cc';
- const { ccclass, property } = _decorator;
- @ccclass('SelectLevel')
- export class SelectLevel extends Component {
- start() {
- let BtnStart = this.node.getChildByName("BtnStart");
- BtnStart.on(Button.EventType.CLICK,this.onBtnStart,this);
- }
- onBtnStart(){
- director.loadScene("MainScene");
- }
- update(deltaTime: number) {
-
- }
- }
|