const {ccclass, property} = cc._decorator;
import ResMgr from '../ResMgr'
import TiledMapCtrl from './TiledMapCtrl'
@ccclass
export default class Item extends cc.Component {
    public config:any = null;
    public tile:cc.Vec2 = cc.v2(0,0);
    init(config){
        this.config = config;
        let spriteCom = this.getComponent(cc.Sprite);
        spriteCom.spriteFrame = ResMgr.getInstance().getSpriteFrame(config.img, 'prop.plist');
    }

    start () {

    }

    setPos(tile:cc.Vec2, pos:cc.Vec2){
        this.tile.x = tile.x;
        this.tile.y = tile.y;
        this.node.x = pos.x;
        this.node.y = pos.y;
    }

    // update (dt) {}
}
