import { Vec3, v3 } from "cc";
import { ecs } from "../../../../../extensions/oops-plugin-framework/assets/libs/ecs/ECS";
import { VM } from "../../../../../extensions/oops-plugin-framework/assets/libs/model-view/ViewModel";
import { SubwayEnum } from "./SubwayEnum";
import { SingletonModuleComp } from "../../common/SingletonModuleComp";




@ecs.register('SubwayModel')
export class SubwayModelComp extends ecs.Comp {


    private vm: any = {};

    private _color: string[] = [];
    private _type: SubwayEnum = SubwayEnum.LEFT
    // private _path: string = ""
    // private _capcity: number = 3
    // private _useSit: number = 0
    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
    }

    /** 颜色 */
    get colorArr(): string[] {
        return this._color;
    }
    set colorArr(value: string[]) {
        this._color = value;
    }

    /** 模型类型 左-右 */
    get type(): SubwayEnum {
        return this._type;
    }
    set type(value: SubwayEnum) {
        this._type = value;
        // this.vm.type = value;
    }


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

    // set capcity(value: number) {
    //     this._capcity = value;
    //     // this.vm.capcity = value;
    // }





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

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

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

