DaFuWeng/assets/scripts/game_root.ts

20 lines
429 B
TypeScript
Raw Normal View History

2024-03-06 21:28:41 +08:00
import { _decorator, Component, Node } from 'cc';
2024-03-06 22:06:49 +08:00
import { dice_domponent, dice_node, dice_dd } from './dice_animation';
2024-03-06 21:28:41 +08:00
const { ccclass, property } = _decorator;
@ccclass('game_root')
export class game_root extends Component {
start() {
const dice = new dice_domponent();
2024-03-06 22:06:49 +08:00
2024-03-06 21:28:41 +08:00
this.node.addChild(new dice_node());
2024-03-06 22:06:49 +08:00
this.node.addChild(dice_dd.getNode());
2024-03-06 21:28:41 +08:00
}
update(deltaTime: number) {
2024-03-06 22:06:49 +08:00
2024-03-06 21:28:41 +08:00
}
}