rock-mod
Version:
Rock-Mod is a powerful framework designed for creating and managing mods for Grand Theft Auto (GTA) games.
39 lines (38 loc) • 1.21 kB
JavaScript
import { RageWorldObject } from "../worldObject/RageWorldObject";
import { RGBA, Vector3D } from "../../../../shared/common/utils";
export class RageMarker extends RageWorldObject {
get markerType() {
return this.mpEntity.model;
}
get visible() {
return this.mpEntity.visible;
}
get rotation() {
const { x, y, z } = this.mpEntity.rotation;
return new Vector3D(x, y, z);
}
constructor(options) {
super(options);
}
setVisible(value) {
this.mpEntity.visible = value;
}
setRotation(value) {
this.mpEntity.rotation = new mp.Vector3(value);
}
get scale() {
return this.mpEntity.scale;
}
setScale(value) {
this.mpEntity.scale = value;
}
get color() {
var _a, _b, _c;
const color = this.mpEntity.color;
return new RGBA((_a = color[0]) !== null && _a !== void 0 ? _a : 0, (_b = color[1]) !== null && _b !== void 0 ? _b : 0, (_c = color[2]) !== null && _c !== void 0 ? _c : 0, color[3]);
}
setColor(value) {
var _a;
this.mpEntity.color = [value.r, value.g, value.b, (_a = value.a) !== null && _a !== void 0 ? _a : 255];
}
}