mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
28 lines
821 B
Plaintext
28 lines
821 B
Plaintext
// Learn TypeScript:
|
|
// - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
|
|
// Learn Attribute:
|
|
// - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
|
|
// Learn life-cycle callbacks:
|
|
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
|
|
|
|
import { _decorator, Component, Node } from 'cc';
|
|
const { ccclass, property } = _decorator;
|
|
|
|
@ccclass('<%Name%>')
|
|
export class <%Name%> extends Component {
|
|
/* class member could be defined like this */
|
|
// dummy = '';
|
|
|
|
/* use `property` decorator if your want the member to be serializable */
|
|
// @property
|
|
// serializableDummy = 0;
|
|
|
|
start () {
|
|
// Your initialization goes here.
|
|
}
|
|
|
|
// update (deltaTime: number) {
|
|
// // Your update function goes here.
|
|
// }
|
|
}
|