-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClass1.cs
93 lines (78 loc) · 3.38 KB
/
Class1.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
using SDG.NetTransport;
using SDG.Unturned;
using Steamworks;
using UnityEngine;
using System;
using uScript.API.Attributes;
using uScript.Core;
using uScript.Module.Main.Classes;
[ScriptModule("uEffectManager")]
public class uEffects
{
[ScriptFunction("sendEffect")]
public static void SendEffect( ushort id, string playerId, Vector3Class position)
{
ITransportConnection transportConnection = Provider.findTransportConnection(new CSteamID(ulong.Parse(playerId)));
EffectManager.sendEffect(id, transportConnection, position.Vector3);
}
[ScriptFunction("triggerEffect")]
public static void TriggerEffect( ushort id, float range, Vector3Class position)
{
var asset = Assets.find(EAssetType.EFFECT, id);
var eff = new TriggerEffectParameters((EffectAsset)asset)
{
relevantDistance = range,
position = position.Vector3
};
EffectManager.triggerEffect(eff);
}
[ScriptFunction("ClearEffectByGuid")]
public static void ClearEffectByGuid(string guid, string playerId)
{
ITransportConnection transportConnection = Provider.findTransportConnection(new CSteamID(ulong.Parse(playerId)));
EffectManager.ClearEffectByGuid(Guid.Parse(guid), transportConnection);
}
[ScriptFunction("askEffectClearByID")]
public static void askEffectClearByID( ushort id, string playerId)
{
ITransportConnection transportConnection = Provider.findTransportConnection(new CSteamID(ulong.Parse(playerId)));
EffectManager.askEffectClearByID(id, transportConnection);
}
[ScriptFunction("ClearEffectByID_AllPlayers")]
public static void ClearEffectByID_AllPlayers(ushort id)
{
EffectManager.ClearEffectByID_AllPlayers(id);
}
[ScriptFunction("ClearEffectByGuid_AllPlayers")]
public static void ClearEffectByGuid_AllPlayers(string guid)
{
EffectManager.ClearEffectByGuid_AllPlayers(Guid.Parse(guid));
}
[ScriptFunction("sendEffectClicked")]
public static void sendEffectClicked(string buttonName)
{
EffectManager.sendEffectClicked(buttonName);
}
[ScriptFunction("sendEffectTextCommitted")]
public static void sendEffectTextCommitted(string inputFieldName, string text)
{
EffectManager.sendEffectTextCommitted(inputFieldName, text);
}
[ScriptFunction("sendEffectReliable")]
public static void sendEffectReliable(ushort id, string playerId, Vector3Class position)
{
ITransportConnection transportConnection = Provider.findTransportConnection(new CSteamID(ulong.Parse(playerId)));
EffectManager.sendEffectReliable(id, transportConnection, position.Vector3);
}
[ScriptFunction("sendEffectReliable_NonUniformScale")]
public static void sendEffectReliable_NonUniformScale(ushort id, string playerId, Vector3Class position, Vector3Class scale)
{
ITransportConnection transportConnection = Provider.findTransportConnection(new CSteamID(ulong.Parse(playerId)));
EffectManager.sendEffectReliable_NonUniformScale(id, transportConnection, position.Vector3, position.Vector3);
}
[ScriptFunction("askEffectClearAll")]
public static void askEffectClearAll()
{
EffectManager.askEffectClearAll();
}
}