123456789101112131415161718192021222324 |
- import { _decorator, Component, director, instantiate, Node, Prefab, resources } from 'cc';
- import { CountDown } from './CountDown';
- const { ccclass, property } = _decorator;
- @ccclass('MainScene')
- export class MainScene extends Component {
- @property(Prefab)
- countDown:Prefab;
- start() {
-
- let countDown = instantiate(this.countDown);
- console.log(countDown.active)
-
- director.getScene().addChild(countDown);
- countDown.setPosition(100,110);
- }
- update(deltaTime: number) {
-
- }
- }
|