@@ -7,10 +7,12 @@ namespace RogueLibsCore
77 /// </summary>
88 public sealed class MeleeHitArgs
99 {
10- internal MeleeHitArgs ( GameObject gameObject , PlayfieldObject target )
10+ internal MeleeHitArgs ( MeleePreHitArgs e )
1111 {
12- GameObject = gameObject ;
13- Target = target ;
12+ GameObject = e . GameObject ;
13+ Target = e . Target ;
14+ IsFirstHit = e . IsFirstHit ;
15+ FromClient = e . FromClient ;
1416 }
1517
1618 /// <summary>
@@ -22,30 +24,40 @@ internal MeleeHitArgs(GameObject gameObject, PlayfieldObject target)
2224 /// </summary>
2325 public PlayfieldObject Target { get ; }
2426
27+ public int DamageDealt { get ; internal set ; }
28+
2529 // Visuals and sounds
2630 /// <summary>
2731 /// <para>Gets or sets whether to highlight the hit object for just a moment.</para>
2832 /// </summary>
2933 public bool DoFlash { get ; set ; }
34+ public string ? Particles { get ; set ; }
35+ public Vector2 ParticlesPosition { get ; set ; }
36+ public float ParticlesAngle { get ; set ; }
37+
3038 /// <summary>
3139 /// <para>Gets or sets the sound that the hit should make.</para>
3240 /// </summary>
3341 public string ? HitSound { get ; set ; }
34- public string ? Particles { get ; set ; }
42+ public Vector2 HitSoundPosition { get ; set ; }
3543 public float NoiseVolume { get ; set ; }
44+ public Vector2 NoisePosition { get ; set ; }
3645
3746 // Input response
3847 public float ScreenShakeTime { get ; set ; }
3948 public float ScreenShakeOffset { get ; set ; }
49+ public float VibrateControllerIntensity { get ; set ; }
50+ public float VibrateControllerTime { get ; set ; }
4051 public int FreezeFrames { get ; set ; }
41- public float VibrateController { get ; set ; }
52+ public bool AlienFX { get ; set ; }
4253
4354 // Knockback
4455 public Vector2 KnockbackDirection { get ; set ; }
4556 public float KnockbackStrength { get ; set ; }
4657 public Vector2 RecoilDirection { get ; set ; }
4758 public float RecoilStrength { get ; set ; }
4859
60+ public bool DoOwnCheck { get ; set ; }
4961 public float AICombatCooldown { get ; set ; }
5062
5163 public int DepleteAmount { get ; set ; }
@@ -60,6 +72,7 @@ internal MeleeHitArgs(GameObject gameObject, PlayfieldObject target)
6072 /// <para>Determines whether this hit was the first one on this object (used with <see cref="CanHitAgain"/>).</para>
6173 /// </summary>
6274 public bool IsFirstHit { get ; }
75+ public bool FromClient { get ; }
6376
6477 /// <summary>
6578 /// <para>Prevents any default behaviour of the melee weapon hit.</para>
@@ -69,17 +82,18 @@ public void PreventDefault()
6982 IsDefaultPrevented = true ;
7083
7184 DoFlash = false ;
72- HitSound = null ;
7385 Particles = null ;
86+ HitSound = null ;
7487 NoiseVolume = 0f ;
7588
76- ScreenShakeTime = 0f ;
7789 ScreenShakeOffset = 0f ;
90+ VibrateControllerIntensity = 0f ;
7891 FreezeFrames = 0 ;
79- VibrateController = 0f ;
92+ AlienFX = false ;
8093
8194 KnockbackStrength = 0f ;
8295 RecoilStrength = 0f ;
96+ DoOwnCheck = false ;
8397 AICombatCooldown = 0f ;
8498 DepleteAmount = 0 ;
8599 }
@@ -89,13 +103,15 @@ public void PreventDefault()
89103 public sealed class MeleePreHitArgs
90104 {
91105 internal MeleePreHitArgs ( GameObject gameObject , PlayfieldObject target ,
92- GameObject originalGameObject , PlayfieldObject originalTarget , bool isFirstHit )
106+ GameObject originalGameObject , PlayfieldObject originalTarget ,
107+ bool isFirstHit , bool fromClient )
93108 {
94109 GameObject = gameObject ;
95110 Target = target ;
96111 OriginalGameObject = originalGameObject ;
97112 OriginalTarget = originalTarget ;
98113 IsFirstHit = isFirstHit ;
114+ FromClient = fromClient ;
99115 }
100116
101117 /// <summary>
@@ -116,12 +132,11 @@ internal MeleePreHitArgs(GameObject gameObject, PlayfieldObject target,
116132 public bool IgnoreLineOfSight { get ; set ; }
117133 public bool IgnoreAlignedCheck { get ; set ; }
118134
119-
120-
121135 /// <summary>
122136 /// <para>Determines whether this hit was the first one on this object (used with <see cref="CanHitAgain"/>).</para>
123137 /// </summary>
124138 public bool IsFirstHit { get ; }
139+ public bool FromClient { get ; }
125140
126141 /// <summary>
127142 /// <para>Prevents any default behaviour of the melee weapon.</para>
0 commit comments