export class SystemEntityContext {

    /**
     *
     * @type {number}
     */
    entity = -1;

    /**
     * Pointer back to the system
     * @type {System}
     */
    system = null;

    /**
     *
     * @type {*[]}
     */
    components = [];

    /**
     *
     * @type {boolean}
     * @protected
     */
    __is_linked = false;

    /**
     *
     * @returns {EntityComponentDataset}
     */
    getDataset() {
        return this.system.entityManager.dataset;
    }

    link() {
        if (this.__is_linked) {
            return;
        }

        this.__is_linked = true;
    }

    unlink() {

        if (!this.__is_linked) {
            return;
        }

        this.__is_linked = false;
    }
}
