UNPKG

sparkscript

Version:
42 lines 1.34 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EntityCondition = exports.EntityEvent = exports.EntityAction = void 0; const components_1 = require("../core/components"); class EntityAction extends components_1.ActionBlock { /** * Used to do something related to an entity or multiple entities. * @param action Action to perform. * @param args Arguments to pass. */ constructor(action, target, ...args) { super("entity_action", action, args, false, target); } } exports.EntityAction = EntityAction; class EntityEvent extends components_1.ActionBlock { /** * When an entity does something. * @param event Event to listen for. */ constructor(event) { super("entity_event", event, []); } } exports.EntityEvent = EntityEvent; class EntityCondition extends components_1.ConditionalBlock { /** * If an entity did something. * @param condition Action of condition. * @param target Target of the condition. * @param args Arguments to pass. */ constructor(condition, target, ...args) { super("if_entity", condition, args, false, target); } } exports.EntityCondition = EntityCondition; exports.default = { Action: EntityAction, Event: EntityEvent, }; //# sourceMappingURL=Entity.js.map