@@ -7,10 +7,12 @@ namespace RogueLibsCore
7
7
/// </summary>
8
8
public sealed class MeleeHitArgs
9
9
{
10
- internal MeleeHitArgs ( GameObject gameObject , PlayfieldObject target )
10
+ internal MeleeHitArgs ( MeleePreHitArgs e )
11
11
{
12
- GameObject = gameObject ;
13
- Target = target ;
12
+ GameObject = e . GameObject ;
13
+ Target = e . Target ;
14
+ IsFirstHit = e . IsFirstHit ;
15
+ FromClient = e . FromClient ;
14
16
}
15
17
16
18
/// <summary>
@@ -22,30 +24,40 @@ internal MeleeHitArgs(GameObject gameObject, PlayfieldObject target)
22
24
/// </summary>
23
25
public PlayfieldObject Target { get ; }
24
26
27
+ public int DamageDealt { get ; internal set ; }
28
+
25
29
// Visuals and sounds
26
30
/// <summary>
27
31
/// <para>Gets or sets whether to highlight the hit object for just a moment.</para>
28
32
/// </summary>
29
33
public bool DoFlash { get ; set ; }
34
+ public string ? Particles { get ; set ; }
35
+ public Vector2 ParticlesPosition { get ; set ; }
36
+ public float ParticlesAngle { get ; set ; }
37
+
30
38
/// <summary>
31
39
/// <para>Gets or sets the sound that the hit should make.</para>
32
40
/// </summary>
33
41
public string ? HitSound { get ; set ; }
34
- public string ? Particles { get ; set ; }
42
+ public Vector2 HitSoundPosition { get ; set ; }
35
43
public float NoiseVolume { get ; set ; }
44
+ public Vector2 NoisePosition { get ; set ; }
36
45
37
46
// Input response
38
47
public float ScreenShakeTime { get ; set ; }
39
48
public float ScreenShakeOffset { get ; set ; }
49
+ public float VibrateControllerIntensity { get ; set ; }
50
+ public float VibrateControllerTime { get ; set ; }
40
51
public int FreezeFrames { get ; set ; }
41
- public float VibrateController { get ; set ; }
52
+ public bool AlienFX { get ; set ; }
42
53
43
54
// Knockback
44
55
public Vector2 KnockbackDirection { get ; set ; }
45
56
public float KnockbackStrength { get ; set ; }
46
57
public Vector2 RecoilDirection { get ; set ; }
47
58
public float RecoilStrength { get ; set ; }
48
59
60
+ public bool DoOwnCheck { get ; set ; }
49
61
public float AICombatCooldown { get ; set ; }
50
62
51
63
public int DepleteAmount { get ; set ; }
@@ -60,6 +72,7 @@ internal MeleeHitArgs(GameObject gameObject, PlayfieldObject target)
60
72
/// <para>Determines whether this hit was the first one on this object (used with <see cref="CanHitAgain"/>).</para>
61
73
/// </summary>
62
74
public bool IsFirstHit { get ; }
75
+ public bool FromClient { get ; }
63
76
64
77
/// <summary>
65
78
/// <para>Prevents any default behaviour of the melee weapon hit.</para>
@@ -69,17 +82,18 @@ public void PreventDefault()
69
82
IsDefaultPrevented = true ;
70
83
71
84
DoFlash = false ;
72
- HitSound = null ;
73
85
Particles = null ;
86
+ HitSound = null ;
74
87
NoiseVolume = 0f ;
75
88
76
- ScreenShakeTime = 0f ;
77
89
ScreenShakeOffset = 0f ;
90
+ VibrateControllerIntensity = 0f ;
78
91
FreezeFrames = 0 ;
79
- VibrateController = 0f ;
92
+ AlienFX = false ;
80
93
81
94
KnockbackStrength = 0f ;
82
95
RecoilStrength = 0f ;
96
+ DoOwnCheck = false ;
83
97
AICombatCooldown = 0f ;
84
98
DepleteAmount = 0 ;
85
99
}
@@ -89,13 +103,15 @@ public void PreventDefault()
89
103
public sealed class MeleePreHitArgs
90
104
{
91
105
internal MeleePreHitArgs ( GameObject gameObject , PlayfieldObject target ,
92
- GameObject originalGameObject , PlayfieldObject originalTarget , bool isFirstHit )
106
+ GameObject originalGameObject , PlayfieldObject originalTarget ,
107
+ bool isFirstHit , bool fromClient )
93
108
{
94
109
GameObject = gameObject ;
95
110
Target = target ;
96
111
OriginalGameObject = originalGameObject ;
97
112
OriginalTarget = originalTarget ;
98
113
IsFirstHit = isFirstHit ;
114
+ FromClient = fromClient ;
99
115
}
100
116
101
117
/// <summary>
@@ -116,12 +132,11 @@ internal MeleePreHitArgs(GameObject gameObject, PlayfieldObject target,
116
132
public bool IgnoreLineOfSight { get ; set ; }
117
133
public bool IgnoreAlignedCheck { get ; set ; }
118
134
119
-
120
-
121
135
/// <summary>
122
136
/// <para>Determines whether this hit was the first one on this object (used with <see cref="CanHitAgain"/>).</para>
123
137
/// </summary>
124
138
public bool IsFirstHit { get ; }
139
+ public bool FromClient { get ; }
125
140
126
141
/// <summary>
127
142
/// <para>Prevents any default behaviour of the melee weapon.</para>
0 commit comments