UNPKG

rock-mod

Version:

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

26 lines (25 loc) 924 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RageObjectsManager = void 0; const RageEntitiesManager_1 = require("../entity/RageEntitiesManager"); const RageObject_1 = require("./RageObject"); class RageObjectsManager extends RageEntitiesManager_1.RageEntitiesManager { constructor() { super({ baseObjectsType: "object", }); } create(options) { const { model, position, dimension, rotation, alpha } = options; const mpEntity = mp.objects.new(model, new mp.Vector3(position), { dimension, rotation: new mp.Vector3(rotation), alpha, }); mpEntity.isExists = () => mp.objects.exists(mpEntity); const object = new RageObject_1.RageObject({ mpEntity }); this.registerBaseObject(object); return object; } } exports.RageObjectsManager = RageObjectsManager;