import { Assets, Container, Sprite } from "pixi.js";
/**
 * Cursor class that show up when we move the cursor on a room tile.
 *
 * @class
 * @memberof Scuti
 */
export class Cursor extends Container {
    /**
     * @param {Room} [room] - The room instance where the cursor will be drawn.
     * @param {ICursorConfiguration} [configuration] - The tile configuration.
     * @param {IPosition3D} [configuration.position] - The cursor position.
     **/
    constructor(room, configuration) {
        super();
        /** Store the configuration */
        this._room = room;
        this._position = configuration.position;
        /** Draw the cursor */
        this._draw();
    }
    /**
     * Draw the cursor.
     *
     * @return {void}
     * @private
     */
    _draw() {
        /** Creating the sprite */
        const texture = Assets.get('room/cursors').textures['tile_cursor_64_a_0_0.png'];
        const sprite = new Sprite(texture);
        sprite.y = -20;
        this.addChild(sprite);
        /** Positionate the cursor */
        this.moveTo(this._position);
    }
    moveTo(position) {
        this._position = position;
        this.x = 32 * this._position.x - 32 * this._position.y;
        this.y = 16 * this._position.x + 16 * this._position.y - 32 * this._position.z;
    }
}
//# sourceMappingURL=Cursor.js.map