-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Resource.cs
188 lines (153 loc) · 5.93 KB
/
Resource.cs
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
using System;
using System.Net;
using System.Runtime.Loader;
using AltV.Net.CApi;
using AltV.Net.Elements.Entities;
using AltV.Net.Elements.Pools;
namespace AltV.Net
{
public abstract class Resource : IResource
{
public abstract void OnStart();
public abstract void OnStop();
public virtual void OnTick()
{
}
public void OnStart(IntPtr serverPointer, IntPtr resourcePointer, string resourceName, string entryPoint)
{
OnStart();
}
public virtual IPoolManager GetBaseBaseObjectPool(IEntityPool<IPlayer> playerPool,
IEntityPool<IVehicle> vehiclePool, IEntityPool<IPed> pedPool, IEntityPool<IObject> objectPool, IBaseObjectPool<IBlip> blipPool,
IBaseObjectPool<ICheckpoint> checkpointPool, IBaseObjectPool<IVoiceChannel> voiceChannelPool,
IBaseObjectPool<IColShape> colShapePool, IBaseObjectPool<IVirtualEntity> virtualEntityPool,
IBaseObjectPool<IVirtualEntityGroup> virtualEntityGroupPool,
IBaseObjectPool<IMarker> markerPool, IBaseObjectPool<IConnectionInfo> connectionInfoPool)
{
return new PoolManager(playerPool, vehiclePool, pedPool, objectPool, blipPool, checkpointPool, voiceChannelPool,
colShapePool, virtualEntityPool, virtualEntityGroupPool, markerPool, connectionInfoPool);
}
public virtual IEntityPool<IPlayer> GetPlayerPool(IEntityFactory<IPlayer> playerFactory)
{
return new PlayerPool(playerFactory);
}
public virtual IEntityPool<IVehicle> GetVehiclePool(IEntityFactory<IVehicle> vehicleFactory)
{
return new VehiclePool(vehicleFactory);
}
public virtual IEntityPool<IPed> GetPedPool(IEntityFactory<IPed> pedFactory)
{
return new PedPool(pedFactory);
}
public IEntityPool<IObject> GetObjectPool(IEntityFactory<IObject> networkObjectFactory)
{
return new ObjectPool(networkObjectFactory);
}
public virtual IBaseObjectPool<IBlip> GetBlipPool(IBaseObjectFactory<IBlip> blipFactory)
{
return new BlipPool(blipFactory);
}
public virtual IBaseObjectPool<ICheckpoint> GetCheckpointPool(IBaseObjectFactory<ICheckpoint> checkpointFactory)
{
return new CheckpointPool(checkpointFactory);
}
public virtual IBaseObjectPool<IVoiceChannel> GetVoiceChannelPool(
IBaseObjectFactory<IVoiceChannel> voiceChannelFactory)
{
return new VoiceChannelPool(voiceChannelFactory);
}
public virtual IBaseObjectPool<IColShape> GetColShapePool(IBaseObjectFactory<IColShape> colShapeFactory)
{
return new ColShapePool(colShapeFactory);
}
public virtual INativeResourcePool GetNativeResourcePool(INativeResourceFactory nativeResourceFactory)
{
return new NativeResourcePool(nativeResourceFactory);
}
public virtual IBaseObjectPool<IVirtualEntity> GetVirtualEntityPool(IBaseObjectFactory<IVirtualEntity> virtualEntityFactory)
{
return new VirtualEntityPool(virtualEntityFactory);
}
public virtual IBaseObjectPool<IVirtualEntityGroup> GetVirtualEntityGroupPool(IBaseObjectFactory<IVirtualEntityGroup> virtualEntityGroupFactory)
{
return new VirtualEntityGroupPool(virtualEntityGroupFactory);
}
public virtual IBaseObjectPool<IMarker> GetMarkerPool(IBaseObjectFactory<IMarker> markerFactory)
{
return new MarkerPool(markerFactory);
}
public IBaseObjectPool<IConnectionInfo> GetConnectionInfoPool(IBaseObjectFactory<IConnectionInfo> connectionInfoFactory)
{
return new ConnectionInfoPool(connectionInfoFactory);
}
public virtual IEntityFactory<IPlayer> GetPlayerFactory()
{
return null;
}
public virtual IEntityFactory<IVehicle> GetVehicleFactory()
{
return null;
}
public virtual IEntityFactory<IPed> GetPedFactory()
{
return null;
}
public virtual IEntityFactory<IObject> GetObjectFactory()
{
return null;
}
public virtual IBaseObjectFactory<IBlip> GetBlipFactory()
{
return null;
}
public virtual IBaseObjectFactory<ICheckpoint> GetCheckpointFactory()
{
return null;
}
public virtual IBaseObjectFactory<IVoiceChannel> GetVoiceChannelFactory()
{
return null;
}
public virtual IBaseObjectFactory<IColShape> GetColShapeFactory()
{
return null;
}
public virtual INativeResourceFactory GetNativeResourceFactory()
{
return null;
}
public virtual IBaseObjectFactory<IVirtualEntity> GetVirtualEntityFactory()
{
return null;
}
public virtual IBaseObjectFactory<IVirtualEntityGroup> GetVirtualEntityGroupFactory()
{
return null;
}
public virtual IBaseObjectFactory<IMarker> GetMarkerFactory()
{
return null;
}
public virtual IBaseObjectFactory<IConnectionInfo> GetConnectionInfoFactory()
{
return null;
}
public ILibrary GetLibrary()
{
return null;
}
public virtual Core GetCore(IntPtr nativePointer, IntPtr resourcePointer, AssemblyLoadContext assemblyLoadContext, ILibrary library, IPoolManager poolManager,
INativeResourcePool nativeResourcePool)
{
return new Core(nativePointer, resourcePointer, assemblyLoadContext, library, poolManager, nativeResourcePool);
}
public IScript[] GetScripts()
{
return null;
}
public IModule[] GetModules()
{
return null;
}
}
}