| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- import { ecs } from "../../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
- import { VM } from "../../../../../extensions/oops-plugin-framework/assets/libs/model-view/ViewModel";
- @ecs.register('PuppetModel')
- export class PuppetModelComp extends ecs.Comp {
- private vm: any = {};
- private _color: string = null
- private _withColider: boolean = true
- /** 颜色 */
- get color(): string {
- return this._color;
- }
- set color(value: string) {
- this._color = value;
- }
- private _x: number
- private _y: number
- get x(): number {
- return this._x
- }
- set x(value: number) {
- this._x = value
- }
- get y(): number {
- return this._y
- }
- set y(value: number) {
- this._y = value
- }
- set withColider(value: boolean) {
- this._withColider = value
- }
- get withColider() {
- return this._withColider
- }
- // vmAdd() {
- // VM.add(this.vm, "Grid");
- // }
- // vmRemove() {
- // this.vm.reset();
- // VM.remove("Grid");
- // }
- reset() {
- this.color = null
- this.x = null
- this.y = null
- // this.vmRemove();
- }
- }
|