1010[ ScriptModule ( "uEffectManager" ) ]
1111public class uEffects
1212{
13+ [ ScriptFunction ( "sendEffect" ) ]
14+ public static void SendEffect ( ushort id , string playerId , Vector3Class position )
15+ {
16+
17+ ITransportConnection transportConnection = Provider . findTransportConnection ( new CSteamID ( ulong . Parse ( playerId ) ) ) ;
18+ EffectManager . sendEffect ( id , transportConnection , position . Vector3 ) ;
19+ }
20+
1321 [ ScriptFunction ( "triggerEffect" ) ]
1422 public static void TriggerEffect ( ushort id , float range , Vector3Class position )
1523 {
@@ -23,27 +31,63 @@ public static void TriggerEffect( ushort id, float range, Vector3Class position)
2331 }
2432
2533 [ ScriptFunction ( "ClearEffectByGuid" ) ]
26- public static void ClearEffectByGuid ( ushort id , string playerId )
34+ public static void ClearEffectByGuid ( string guid , string playerId )
2735 {
2836 ITransportConnection transportConnection = Provider . findTransportConnection ( new CSteamID ( ulong . Parse ( playerId ) ) ) ;
29- var asset = Assets . find ( EAssetType . EFFECT , id ) ;
30- EffectManager . ClearEffectByGuid ( asset . GUID , transportConnection ) ;
37+ EffectManager . ClearEffectByGuid ( Guid . Parse ( guid ) , transportConnection ) ;
38+
3139 }
40+
3241 [ ScriptFunction ( "askEffectClearByID" ) ]
3342 public static void askEffectClearByID ( ushort id , string playerId )
3443 {
3544 ITransportConnection transportConnection = Provider . findTransportConnection ( new CSteamID ( ulong . Parse ( playerId ) ) ) ;
3645 EffectManager . askEffectClearByID ( id , transportConnection ) ;
3746 }
47+
3848 [ ScriptFunction ( "ClearEffectByID_AllPlayers" ) ]
3949 public static void ClearEffectByID_AllPlayers ( ushort id )
4050 {
4151 EffectManager . ClearEffectByID_AllPlayers ( id ) ;
4252 }
53+
4354 [ ScriptFunction ( "ClearEffectByGuid_AllPlayers" ) ]
44- public static void ClearEffectByGuid_AllPlayers ( ushort id )
55+ public static void ClearEffectByGuid_AllPlayers ( string guid )
56+ {
57+ EffectManager . ClearEffectByGuid_AllPlayers ( Guid . Parse ( guid ) ) ;
58+ }
59+
60+ [ ScriptFunction ( "sendEffectClicked" ) ]
61+ public static void sendEffectClicked ( string buttonName )
62+ {
63+ EffectManager . sendEffectClicked ( buttonName ) ;
64+ }
65+
66+ [ ScriptFunction ( "sendEffectTextCommitted" ) ]
67+ public static void sendEffectTextCommitted ( string inputFieldName , string text )
68+ {
69+ EffectManager . sendEffectTextCommitted ( inputFieldName , text ) ;
70+ }
71+
72+ [ ScriptFunction ( "sendEffectReliable" ) ]
73+ public static void sendEffectReliable ( ushort id , string playerId , Vector3Class position )
74+ {
75+ ITransportConnection transportConnection = Provider . findTransportConnection ( new CSteamID ( ulong . Parse ( playerId ) ) ) ;
76+ EffectManager . sendEffectReliable ( id , transportConnection , position . Vector3 ) ;
77+ }
78+
79+ [ ScriptFunction ( "sendEffectReliable_NonUniformScale" ) ]
80+ public static void sendEffectReliable_NonUniformScale ( ushort id , string playerId , Vector3Class position , Vector3Class scale )
81+ {
82+ ITransportConnection transportConnection = Provider . findTransportConnection ( new CSteamID ( ulong . Parse ( playerId ) ) ) ;
83+ EffectManager . sendEffectReliable_NonUniformScale ( id , transportConnection , position . Vector3 , position . Vector3 ) ;
84+ }
85+
86+ [ ScriptFunction ( "askEffectClearAll" ) ]
87+ public static void askEffectClearAll ( )
4588 {
46- var asset = Assets . find ( EAssetType . EFFECT , id ) ;
47- EffectManager . ClearEffectByGuid_AllPlayers ( asset . GUID ) ;
89+ EffectManager . askEffectClearAll ( ) ;
4890 }
91+
92+
4993}
0 commit comments