12345678910111213141516171819202122232425262728 |
- import { _decorator, Component, Node } from 'cc';
- import { uiManager } from '../../manager/uiManager';
- import { home_car } from './home_car';
- import { home_top } from './home_top';
- import { home_bottom } from './home_bottom';
- import { tools } from '../../tools';
- const { ccclass, property } = _decorator;
- @ccclass('home')
- export class home extends Component {
- @property(Node) home_car:Node = null
- @property(Node) top:Node = null
- @property(Node) bottom:Node = null
- @property(Node) btn_start_game:Node = null
- protected start(): void {
- uiManager.Instance().onButtonListen(this.btn_start_game,()=>{
- tools.playGame()
- this.node.parent.active = false
- })
- }
- public init(){
- this.home_car.getComponent(home_car).updateCar()
- this.top.getComponent(home_top).init()
- this.bottom.getComponent(home_bottom).init()
- }
- }
|