Files
cocos4/editor/assets/default_file_content/ts
T
黄森斌 6c53d88327 V3.3.0 add scene-2d template for 2d project (#9145)
* add scene-2d template

* Update editor/assets/default_file_content/ts

Co-authored-by: SijieWang <itharbors@outlook.com>

Co-authored-by: SijieWang <itharbors@outlook.com>
2021-08-06 11:28:46 +08:00

45 lines
1017 B
Plaintext

import { _decorator, Component, Node } from 'cc';
const { ccclass, property } = _decorator;
/**
* Predefined variables
* Name = <%Name%>
* DateTime = <%DateTime%>
* Author = <%Author%>
* FileBasename = <%FileBasename%>
* FileBasenameNoExtension = <%FileBasenameNoExtension%>
* URL = <%URL%>
* ManualUrl = <%ManualUrl%>
*
*/
@ccclass('<%Name%>')
export class <%Name%> extends Component {
// [1]
// dummy = '';
// [2]
// @property
// serializableDummy = 0;
start () {
// [3]
}
// update (deltaTime: number) {
// // [4]
// }
}
/**
* [1] Class member could be defined like this.
* [2] Use `property` decorator if your want the member to be serializable.
* [3] Your initialization goes here.
* [4] Your update function goes here.
*
* Learn more about scripting: <%ManualUrl%>scripting/
* Learn more about CCClass: <%ManualUrl%>scripting/ccclass.html
* Learn more about life-cycle callbacks: <%ManualUrl%>scripting/life-cycle-callbacks.html
*/