forked from FabianTerhorst/coreclr-module
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAltAsync.Blip.cs
More file actions
70 lines (53 loc) · 3.01 KB
/
AltAsync.Blip.cs
File metadata and controls
70 lines (53 loc) · 3.01 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
59
60
61
62
63
64
65
66
67
68
69
70
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(IPlayer player, byte type, Position pos) =>
AltVAsync.Schedule(() => Alt.CreateBlip(player, type, pos));
public static Task<IBlip> CreateBlip(IPlayer player, byte type, IEntity entityAttach) =>
AltVAsync.Schedule(() => Alt.CreateBlip(player, type, entityAttach));
public static Task<IBlip> CreateBlip(IPlayer player, BlipType type, Position pos) =>
AltVAsync.Schedule(() => Alt.CreateBlip(player, type, pos));
public static Task<IBlip> CreateBlip(IPlayer player, BlipType type, IEntity entityAttach) =>
AltVAsync.Schedule(() => Alt.CreateBlip(player, type, entityAttach));
public static Task<IBlip> CreateBlip(byte type, Position pos) =>
AltVAsync.Schedule(() => Alt.CreateBlip(type, pos));
public static Task<IBlip> CreateBlip(byte type, IEntity entityAttach) =>
AltVAsync.Schedule(() => Alt.CreateBlip(type, entityAttach));
public static Task<IBlip> CreateBlip(BlipType type, Position pos) =>
AltVAsync.Schedule(() => Alt.CreateBlip(type, pos));
public static Task<IBlip> CreateBlip(BlipType type, IEntity entityAttach) =>
AltVAsync.Schedule(() => Alt.CreateBlip(type, entityAttach));
[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);
}
}