-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
AltAsync.Blip.cs
58 lines (45 loc) · 2.52 KB
/
AltAsync.Blip.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
using System;
using System.Threading.Tasks;
using AltV.Net.Data;
using AltV.Net.Elements.Entities;
namespace AltV.Net.Async
{
public static partial class AltAsync
{
public static Task<IBlip> CreateBlip(bool global, byte type, Position pos, IPlayer[] targets) =>
AltVAsync.Schedule(() => Alt.CreateBlip(global, type, pos, targets));
public static Task<IBlip> CreateBlip(bool global, byte type, IEntity entityAttach, IPlayer[] targets) =>
AltVAsync.Schedule(() => Alt.CreateBlip(global, type, entityAttach, targets));
public static Task<IBlip> CreateBlip(bool global, BlipType type, Position pos, IPlayer[] targets) =>
AltVAsync.Schedule(() => Alt.CreateBlip(global, type, pos, targets));
public static Task<IBlip> CreateBlip(bool global, BlipType type, IEntity entityAttach, IPlayer[] targets) =>
AltVAsync.Schedule(() => Alt.CreateBlip(global, type, entityAttach, targets));
[Obsolete("Use async entities instead")]
public static Task<bool> IsGlobalAsync(this IBlip blip) =>
AltVAsync.Schedule(() => blip.IsGlobal);
[Obsolete("Use async entities instead")]
public static Task<bool> IsAttachedAsync(this IBlip blip) =>
AltVAsync.Schedule(() => blip.IsAttached);
[Obsolete("Use async entities instead")]
public static Task<IEntity> AttachedToAsync(this IBlip blip) =>
AltVAsync.Schedule(() => blip.AttachedTo);
[Obsolete("Use async entities instead")]
public static Task<BlipType> GetBlipTypeAsync(this IBlip blip) =>
AltVAsync.Schedule(() => (BlipType) blip.BlipType);
[Obsolete("Use async entities instead")]
public static Task SetSpriteAsync(this IBlip blip, ushort sprite) =>
AltVAsync.Schedule(() => blip.Sprite = sprite);
[Obsolete("Use async entities instead")]
public static Task SetColorAsync(this IBlip blip, byte color) =>
AltVAsync.Schedule(() => blip.Color = color);
[Obsolete("Use async entities instead")]
public static Task SetRouteAsync(this IBlip blip, bool route) =>
AltVAsync.Schedule(() => blip.Route = route);
[Obsolete("Use async entities instead")]
public static Task SetRouteColorAsync(this IBlip blip, Rgba color) =>
AltVAsync.Schedule(() => blip.RouteColor = color);
[Obsolete("Use async entities instead")]
public static Task RemoveAsync(this IBlip blip) =>
AltVAsync.Schedule(blip.RemoveAsync);
}
}