58 lines
1.7 KiB
Plaintext
58 lines
1.7 KiB
Plaintext
import { _decorator, Component, Node } from 'cc';
|
|
const { ccclass, property } = _decorator;
|
|
|
|
@ccclass('<%UnderscoreCaseClassName%>')
|
|
export class <%UnderscoreCaseClassName%> extends Component {
|
|
start() {
|
|
|
|
}
|
|
|
|
update(deltaTime: number) {
|
|
|
|
}
|
|
}
|
|
|
|
/**
|
|
* COMMENTS_GENERATE_IGNORE
|
|
* Use "COMMENTS_GENERATE_IGNORE" tag if you do not want later created scripts to contain these comments.
|
|
*
|
|
* Predefined Variables
|
|
* You can use predefined variables below to setup your scripting preference. For example, whether to use camel case style.
|
|
*
|
|
* <%UnderscoreCaseClassName%>, class name in underscore format, like 'new_component'
|
|
* <%CamelCaseClassName%>, class name in camel format, like 'NewComponent'
|
|
* <%Author%>, Who create this file
|
|
* <%DateTime%>, when create this file
|
|
* <%FileBasename%>, creating file name with extension
|
|
* <%FileBasenameNoExtension%>, creating file name without extension
|
|
* <%URL%>, url of this file in COCOS ASSET URL format
|
|
* <%ManualUrl%>, url of office help document, like 'https://docs.cocos.com/creator/manual/en/'
|
|
*
|
|
*
|
|
* Example:
|
|
*
|
|
@ccclass('<%UnderscoreCaseClassName%>')
|
|
export class <%UnderscoreCaseClassName%> 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.
|
|
}
|
|
|
|
}
|
|
*
|
|
* Learn more about scripting: <%ManualUrl%>scripting/
|
|
* Learn more about CCClass: <%ManualUrl%>scripting/decorator.html
|
|
* Learn more about life-cycle callbacks: <%ManualUrl%>scripting/life-cycle-callbacks.html
|
|
*/
|