
import * as Matter from "matter-js";
import { RES } from "../../../module/RES";
export default class Word extends FYGE.Container {
    itemImg: FYGE.Sprite;
    wordTx;
    index
    constructor(data?) {
        super();
        this.wordTx = data.wordTx;
        this.index = data.index;
        let itemImg = this.itemImg = new FYGE.Sprite();
        itemImg.texture = RES.getRes(`word_${data.wordTx}.png`);
        

        itemImg.position.set(-itemImg.width / 2, -itemImg.height / 2);
        this.addChild(itemImg);
    }

    set fx(value: number) {
        this.position.x = value;
    }

    set fy(value: number) {
        this.position.y = value;
    }


}