add some extra assets FX and SFX
This commit is contained in:
@@ -272,6 +272,14 @@ public class damageHitReactionSystem : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (currentHitReactionInfo.damageReactionIDMustMatch) {
|
||||
canCheckRegularReaction = false;
|
||||
|
||||
if (showDebugPrint) {
|
||||
print ("damage reaction ID doesn't match for " + currentHitReactionInfo.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (canCheckRegularReaction) {
|
||||
@@ -282,7 +290,7 @@ public class damageHitReactionSystem : MonoBehaviour
|
||||
}
|
||||
|
||||
if (ignoreMinAmountToReceiveDamage) {
|
||||
canCheckReaction = true;
|
||||
canCheckReaction = true;
|
||||
}
|
||||
|
||||
if (blockDamageActive && (damageBlocked || damageReceived == 0)) {
|
||||
@@ -294,11 +302,19 @@ public class damageHitReactionSystem : MonoBehaviour
|
||||
}
|
||||
|
||||
if (canCheckReaction) {
|
||||
if (showDebugPrint) {
|
||||
print (currentHitReactionInfo.Name + " " + maxDamageFound + " " + currentHitReactionInfo.minAmountToReceiveDamage + " " + damageReactionID);
|
||||
}
|
||||
|
||||
if (currentHitReactionInfo.minAmountToReceiveDamage > maxDamageFound) {
|
||||
if (damageReactionID > -1 ||
|
||||
(currentHitReactionInfo.damageDirection == hitDamageDirection.anyDirection ||
|
||||
currentHitReactionInfo.damageDirection == currenthitDamageDirection)) {
|
||||
|
||||
if (showDebugPrint) {
|
||||
print ("new value found " + currentHitReactionInfo.Name);
|
||||
}
|
||||
|
||||
maxDamageFound = currentHitReactionInfo.minAmountToReceiveDamage;
|
||||
|
||||
hitReactionIndex = i;
|
||||
@@ -484,8 +500,6 @@ public class damageHitReactionSystem : MonoBehaviour
|
||||
|
||||
public void checkDamageStateTemporally (float damageReceived, bool damageBlockedByShieldSystem)
|
||||
{
|
||||
// print (damageReceived);
|
||||
|
||||
bool damageStateFound = false;
|
||||
|
||||
if (damageReceived > 0) {
|
||||
@@ -500,7 +514,6 @@ public class damageHitReactionSystem : MonoBehaviour
|
||||
if (!damageStateFound && currentDamageStateInfo.damageStateEnabled) {
|
||||
if (currentDamageStateInfo.damageStateRange.x <= damageReceived &&
|
||||
currentDamageStateInfo.damageStateRange.y >= damageReceived) {
|
||||
// print (currentDamageStateInfoName);
|
||||
|
||||
currentDamageStateInfo.eventOnDamageState.Invoke ();
|
||||
|
||||
@@ -518,8 +531,6 @@ public class damageHitReactionSystem : MonoBehaviour
|
||||
if (currentDamageStateInfo.useAsDefaultState) {
|
||||
currentDamageStateInfo.eventOnDamageState.Invoke ();
|
||||
|
||||
// print (currentDamageStateInfo.Name);
|
||||
|
||||
damageStateFound = true;
|
||||
}
|
||||
}
|
||||
@@ -671,6 +682,10 @@ public class damageHitReactionSystem : MonoBehaviour
|
||||
|
||||
public int damageReactionID = -1;
|
||||
|
||||
public bool damageReactionIDMustMatch;
|
||||
|
||||
[Space]
|
||||
|
||||
public string reactionCategory;
|
||||
|
||||
public float minAmountToReceiveDamage;
|
||||
|
||||
Reference in New Issue
Block a user