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('VehicleModelComp')
export class VehicleModelComp extends ecs.Comp {


    private vm: any = {};

    private _color: string = "";
    private _type: string = 'car'
    private _path: string = ""
    private _capcity: number = 3
    private _useSit: number = 0
    /** 颜色 */
    get color(): string {
        return this._color;
    }
    set color(value: string) {
        this._color = value;
    }

    /** 模型类型 车-飞机 */
    get type(): string {
        return this._type;
    }
    set type(value: string) {
        this._type = value;
        // this.vm.type = value;
    }

    /** 模型路径 */
    get path(): string {
        return this._path;
    }
    set path(value: string) {
        this._path = value;
        // this.vm.path = value;
    }

    /** 容量 */
    get capcity(): number {
        return this._capcity;
    }
    set capcity(value: number) {
        this._capcity = value;
        // this.vm.capcity = value;
    }


    /** 上车席位 */
    get useSit(): number {
        return this._useSit;
    }
    set useSit(value: number) {
        this._useSit = value;
        // this.vm.useSit = value;
    }



    // vmAdd() {
    //     VM.add(this.vm, "Vehicle");
    // }

    // vmRemove() {
    //     this.vm.reset();
    //     VM.remove("Vehicle");
    // }

    reset() {
        // this.vmRemove();
    }
}

