forked from FabianTerhorst/coreclr-module
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIResource.cs
More file actions
58 lines (47 loc) · 2.63 KB
/
IResource.cs
File metadata and controls
58 lines (47 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using System;
using System.Runtime.Loader;
using AltV.Net.CApi;
using AltV.Net.Elements.Entities;
namespace AltV.Net
{
//TODO: add SubResource module maybe to load sub resources dependency dlls or just for own server architecture
public interface IResource
{
void OnStart(IntPtr serverPointer, IntPtr resourcePointer, string resourceName,
string entryPoint);
void OnStart();
void OnStop();
void OnTick();
//TODO: default implementation in c# 8.0
IBaseEntityPool GetBaseEntityPool(IEntityPool<IPlayer> playerPool, IEntityPool<IVehicle> vehiclePool);
IBaseBaseObjectPool GetBaseBaseObjectPool(IEntityPool<IPlayer> playerPool, IEntityPool<IVehicle> vehiclePool,
IBaseObjectPool<IBlip> blipPool, IBaseObjectPool<ICheckpoint> checkpointPool,
IBaseObjectPool<IVoiceChannel> voiceChannelPool, IBaseObjectPool<IColShape> colShapePool);
IEntityPool<IPlayer> GetPlayerPool(IEntityFactory<IPlayer> playerFactory);
IEntityPool<IVehicle> GetVehiclePool(IEntityFactory<IVehicle> vehicleFactory);
IBaseObjectPool<IBlip> GetBlipPool(IBaseObjectFactory<IBlip> blipFactory);
IBaseObjectPool<ICheckpoint> GetCheckpointPool(IBaseObjectFactory<ICheckpoint> checkpointFactory);
IBaseObjectPool<IVoiceChannel> GetVoiceChannelPool(IBaseObjectFactory<IVoiceChannel> voiceChannelFactory);
IBaseObjectPool<IColShape> GetColShapePool(IBaseObjectFactory<IColShape> colShapeFactory);
INativeResourcePool GetNativeResourcePool(INativeResourceFactory nativeResourceFactory);
IEntityFactory<IPlayer> GetPlayerFactory();
IEntityFactory<IVehicle> GetVehicleFactory();
IBaseObjectFactory<IBlip> GetBlipFactory();
IBaseObjectFactory<ICheckpoint> GetCheckpointFactory();
IBaseObjectFactory<IVoiceChannel> GetVoiceChannelFactory();
IBaseObjectFactory<IColShape> GetColShapeFactory();
INativeResourceFactory GetNativeResourceFactory();
ILibrary GetLibrary();
Core GetCore(IntPtr nativePointer, IntPtr resourcePointer, AssemblyLoadContext assemblyLoadContext, ILibrary library, IBaseBaseObjectPool baseBaseObjectPool,
IBaseEntityPool baseEntityPool,
IEntityPool<IPlayer> playerPool,
IEntityPool<IVehicle> vehiclePool,
IBaseObjectPool<IBlip> blipPool,
IBaseObjectPool<ICheckpoint> checkpointPool,
IBaseObjectPool<IVoiceChannel> voiceChannelPool,
IBaseObjectPool<IColShape> colShapePool,
INativeResourcePool nativeResourcePool);
IScript[] GetScripts();
IModule[] GetModules();
}
}