Laya2.4.0之后创建脚本模板

laya2.4版本以后,内置的vscode删除了,没有代码编辑器了,需要外置打开vscode.(这1点很落后,比cocos差远了,哎)

只能自己在vscode写代码,生成一个代码模板Laya2.4.0之后创建脚本模板
Laya2.4.0之后创建脚本模板
Laya2.4.0之后创建脚本模板
{
“React-Native Class”:{
“scope”: “javascript,typescript”,
“prefix”: “laya_module”,
“body”: [
“/",
",
"
@ author:cmd”,
“* @ wechat:[email protected]”,
“* @ data: CURRENTYEARCURRENT_YEAR-CURRENT_MONTH-$CURRENT_DATE CURRENTHOUR:CURRENT_HOUR:CURRENT_MINUTE”,
“*/”,
“export default class $TM_FILENAME_BASE extends Laya.Script {”,
“”,
“\tconstructor() {”,
“\t\tsuper();”,
"\t\t/
@prop {name:name, tips:“提示文本”, type:Node, default:null}*/”,
“\t\tthis.xx=null;”,
“\t}”,
“”,
“\tonAwake() {”,
“\t}”,
“}”
],
“description”: “快速创建一个Laya模板类”
}
}

/** @prop {name:intType, tips:“整数类型示例”, type:Int, default:1000}/
let intType = 1000;
/** @prop {name:numType, tips:“数字类型示例”, type:Number, default:1000}
/
let numType = 1000;
/** @prop {name:strType, tips:“字符串类型示例”, type:String, default:“hello laya”}/
let strType = “hello laya”;
/** @prop {name:boolType, tips:“布尔类型示例”, type:Bool, default:true}
/
let boolType = true;