rock-mod
Version:
Rock-Mod is a powerful framework designed for creating and managing mods for Grand Theft Auto (GTA) games.
90 lines (89 loc) • 2.29 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCMPBlip = void 0;
const CCMPWorldObject_1 = require("../worldObject/CCMPWorldObject");
const shared_1 = require("../../../../shared");
const Vectors_1 = require("../../../../shared/common/utils/math/Vectors");
class CCMPBlip extends CCMPWorldObject_1.CCMPWorldObject {
_ccmpBlip;
_onDestroy;
get id() {
return this._ccmpBlip.id;
}
get type() {
return shared_1.BaseObjectType.Blip;
}
get isExists() {
return this._ccmpBlip.isExists;
}
get position() {
const p = this._ccmpBlip.position;
return new Vectors_1.Vector3D(p.x, p.y, p.z);
}
get dimension() {
return this._ccmpBlip.dimension;
}
get name() {
return this._ccmpBlip.name;
}
get sprite() {
return this._ccmpBlip.sprite;
}
get color() {
return this._ccmpBlip.color;
}
get alpha() {
return this._ccmpBlip.alpha;
}
get scale() {
return this._ccmpBlip.scale;
}
get drawDistance() {
return this._ccmpBlip.drawDistance;
}
get global() {
return this._ccmpBlip.global;
}
get shortRange() {
return this._ccmpBlip.shortRange;
}
get rotation() {
return this._ccmpBlip.rotation;
}
constructor(options) {
super();
this._ccmpBlip = options.ccmpBlip;
this._onDestroy = options.onDestroy;
}
destroy() {
if (!this._ccmpBlip.isExists)
return;
this._ccmpBlip.destroy();
this._onDestroy(this);
}
setPosition(value) {
this._ccmpBlip.position = { x: value.x, y: value.y, z: value.z };
}
setDimension(value) {
this._ccmpBlip.dimension = value;
}
getNetData(name) {
return this._ccmpBlip.getStreamSyncedMeta(name);
}
setNetData(name, value) {
this._ccmpBlip.setStreamSyncedMeta(name, value);
}
setName(value) {
this._ccmpBlip.name = value;
}
setSprite(value) {
this._ccmpBlip.sprite = value;
}
setColor(value) {
this._ccmpBlip.color = value;
}
setAlpha(value) {
this._ccmpBlip.alpha = value;
}
}
exports.CCMPBlip = CCMPBlip;