UNPKG

rock-mod

Version:

Rock-Mod is a powerful framework designed for creating and managing mods for Grand Theft Auto (GTA) games.

57 lines (56 loc) 1.66 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CCMPColshape = void 0; const CCMPWorldObject_1 = require("../worldObject/CCMPWorldObject"); const shared_1 = require("../../../../shared"); const Vectors_1 = require("../../../../shared/common/utils/math/Vectors"); class CCMPColshape extends CCMPWorldObject_1.CCMPWorldObject { _ccmpColshape; _onDestroy; get id() { return this._ccmpColshape.id; } get type() { return shared_1.BaseObjectType.Colshape; } get isExists() { return this._ccmpColshape.isExists; } get position() { const p = this._ccmpColshape.position; return new Vectors_1.Vector3D(p.x, p.y, p.z); } get dimension() { return this._ccmpColshape.dimension; } get key() { return this._ccmpColshape.key; } get playersInside() { return this._ccmpColshape.playersInside; } getNetData(name) { return this._ccmpColshape.getStreamSyncedMeta(name); } setNetData(name, value) { this._ccmpColshape.setStreamSyncedMeta(name, value); } constructor(options) { super(); this._ccmpColshape = options.ccmpColshape; this._onDestroy = options.onDestroy; } destroy() { if (!this._ccmpColshape.isExists) return; this._ccmpColshape.destroy(); this._onDestroy(this); } setPosition(value) { this._ccmpColshape.position = { x: value.x, y: value.y, z: value.z }; } setDimension(value) { this._ccmpColshape.dimension = value; } } exports.CCMPColshape = CCMPColshape;