44 lines
971 B
TypeScript
44 lines
971 B
TypeScript
|
const { ccclass, property, executeInEditMode, inspector, playOnFocus } = cc._decorator;
|
||
|
|
||
|
@ccclass
|
||
|
@inspector("packages://slot1501-polygon/Slot1501_EditMode.js")
|
||
|
@playOnFocus
|
||
|
@executeInEditMode
|
||
|
export default class Slot1501_EditMode extends cc.Component {
|
||
|
|
||
|
@property(String)
|
||
|
private Type: string = "1";
|
||
|
|
||
|
private _preview: string = "";
|
||
|
|
||
|
public get preview() {
|
||
|
return this._preview;
|
||
|
}
|
||
|
|
||
|
public set preview(value: string) {
|
||
|
this._preview = value;
|
||
|
// cc.log("Type:" + this.Type);
|
||
|
switch (this.Type) {
|
||
|
case "1":
|
||
|
// cc.log("CreateWall");
|
||
|
this.CreateWall();
|
||
|
break;
|
||
|
|
||
|
default:
|
||
|
cc.log("沒東西處理");
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//#region Create
|
||
|
|
||
|
/**
|
||
|
* 生成Wall Group
|
||
|
*/
|
||
|
private CreateWall(): void {
|
||
|
cc.log("CreateWall");
|
||
|
}
|
||
|
|
||
|
//#endregion
|
||
|
}
|