-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathIEntityPool.cs
37 lines (24 loc) · 978 Bytes
/
IEntityPool.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
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using AltV.Net.Elements.Entities;
using AltV.Net.Elements.Pools;
namespace AltV.Net
{
public interface IEntityPool<TEntity> : IReadOnlyEntityPool<TEntity> where TEntity : IEntity
{
TEntity Create(ICore core, IntPtr entityPointer, uint id);
TEntity Create(ICore core, IntPtr entityPointer);
void Add(TEntity entity);
bool Remove(TEntity entity);
bool Remove(IntPtr entityPointer);
TEntity GetOrCreate(ICore core, IntPtr entityPointer, uint entityId);
TEntity GetOrCreate(ICore core, IntPtr entityPointer);
KeyValuePair<IntPtr, TEntity>[] GetEntitiesArray();
void ForEach(IBaseObjectCallback<TEntity> baseObjectCallback);
Task ForEach(IAsyncBaseObjectCallback<TEntity> asyncBaseObjectCallback);
void OnAdd(TEntity entity);
void OnRemove(TEntity entity);
void Dispose();
}
}