add some extra assets FX and SFX

This commit is contained in:
Robii Aragon
2026-03-29 23:03:14 -07:00
parent 6ef3eb1535
commit 24dc66a81e
10142 changed files with 2535978 additions and 36608 deletions

View File

@@ -147,6 +147,11 @@ public class meleeWeaponsGrabbedManager : MonoBehaviour
public bool fullBodyAwarenessActive;
[Space]
public bool customMeleeWeaponMeshScaleActive;
public float customMeleeWeaponMeshScale = 0;
[Space]
[Header ("Components")]
[Space]
@@ -375,6 +380,8 @@ public class meleeWeaponsGrabbedManager : MonoBehaviour
newMeleeWeaponGrabbedInfo.weaponPrefabIndex = currentMeleeWeaponPrefabInfo.weaponPrefabIndex;
meleeWeaponGrabbedInfoList.Add (newMeleeWeaponGrabbedInfo);
//print (newMeleeWeaponGrabbedInfo.Name);
} else {
if (showDebugPrint) {
print ("melee weapon was already on the initial list");
@@ -402,6 +409,8 @@ public class meleeWeaponsGrabbedManager : MonoBehaviour
if (currentMeleeWeaponPrefabInfo != null) {
currentMeleeWeaponGrabbedInfo.weaponStored = (GameObject)Instantiate (currentMeleeWeaponPrefabInfo.weaponPrefab, Vector3.up * 1000, Quaternion.identity);
checkMeleeWeaponScale (currentMeleeWeaponGrabbedInfo.weaponStored.transform);
currentMeleeWeaponGrabbedInfo.weaponPrefabIndex = currentMeleeWeaponPrefabInfo.weaponPrefabIndex;
bool hideWeaponMeshResult = checkIfHideWeaponMeshWhenNotUsed (currentMeleeWeaponGrabbedInfo.hideWeaponMeshWhenNotUsed);
@@ -616,6 +625,8 @@ public class meleeWeaponsGrabbedManager : MonoBehaviour
if (currentMeleeWeaponPrefabInfo != null) {
currentMeleeWeaponGrabbedInfo.weaponStored = (GameObject)Instantiate (currentMeleeWeaponPrefabInfo.weaponPrefab, Vector3.up * 1000, Quaternion.identity);
checkMeleeWeaponScale (currentMeleeWeaponGrabbedInfo.weaponStored.transform);
currentMeleeWeaponGrabbedInfo.weaponPrefabIndex = currentMeleeWeaponPrefabInfo.weaponPrefabIndex;
grabPhysicalObjectSystem currentGrabPhysicalObjectSystem = currentMeleeWeaponGrabbedInfo.weaponStored.GetComponent<grabPhysicalObjectSystem> ();
@@ -750,6 +761,8 @@ public class meleeWeaponsGrabbedManager : MonoBehaviour
if (!meleeWeaponsGrabbedManagerActive) {
currentMeleeWeaponSheathedOrCarried = false;
}
mainGrabbedObjectMeleeAttackSystem.checkResetAttackInputStack ();
}
public void setDrawMeleeWeaponsPausedState (bool state)
@@ -872,7 +885,11 @@ public class meleeWeaponsGrabbedManager : MonoBehaviour
currentMeleeWeaponGrabbedInfo.weaponMesh = (GameObject)Instantiate (weaponMeshToInstantiate, Vector3.zero, Quaternion.identity);
currentMeleeWeaponGrabbedInfo.weaponMesh.transform.localScale = currentGrabPhysicalObjectMeleeAttackSystem.weaponMesh.transform.localScale;
if (customMeleeWeaponMeshScaleActive) {
currentMeleeWeaponGrabbedInfo.weaponMesh.transform.localScale = Vector3.one * customMeleeWeaponMeshScale;
} else {
currentMeleeWeaponGrabbedInfo.weaponMesh.transform.localScale = currentGrabPhysicalObjectMeleeAttackSystem.weaponMesh.transform.localScale;
}
weaponMeshCreated = true;
}
@@ -1009,7 +1026,9 @@ public class meleeWeaponsGrabbedManager : MonoBehaviour
meleeWeaponGrabbedInfo newMeleeWeaponGrabbedInfo = new meleeWeaponGrabbedInfo ();
newMeleeWeaponGrabbedInfo.Name = weaponName;
newMeleeWeaponGrabbedInfo.isCurrentWeapon = true;
newMeleeWeaponGrabbedInfo.carryingWeapon = true;
currentMeleeWeaponSheathedOrCarried = true;
@@ -1018,6 +1037,8 @@ public class meleeWeaponsGrabbedManager : MonoBehaviour
newMeleeWeaponGrabbedInfo.weaponStored = weaponGameObject;
checkMeleeWeaponScale (newMeleeWeaponGrabbedInfo.weaponStored.transform);
grabPhysicalObjectMeleeAttackSystem currentGrabPhysicalObjectMeleeAttackSystem = newMeleeWeaponGrabbedInfo.weaponStored.GetComponent<grabPhysicalObjectMeleeAttackSystem> ();
bool hideWeaponMeshResult = checkIfHideWeaponMeshWhenNotUsed (currentGrabPhysicalObjectMeleeAttackSystem.hideWeaponMeshWhenNotUsed);
@@ -1028,6 +1049,8 @@ public class meleeWeaponsGrabbedManager : MonoBehaviour
meleeWeaponGrabbedInfoList.Add (newMeleeWeaponGrabbedInfo);
//print (newMeleeWeaponGrabbedInfo.Name);
currentNumberOfWeaponsAvailable = getCurrentNumberOfWeaponsAvailable ();
currentWeaponIndex = meleeWeaponGrabbedInfoList.Count - 1;
@@ -1092,6 +1115,7 @@ public class meleeWeaponsGrabbedManager : MonoBehaviour
for (int k = 0; k < meleeWeaponGrabbedInfoList.Count; k++) {
if (weaponIndex == k) {
meleeWeaponGrabbedInfoList [k].isCurrentWeapon = true;
meleeWeaponGrabbedInfoList [k].carryingWeapon = true;
currentMeleeWeaponSheathedOrCarried = true;
@@ -1119,6 +1143,8 @@ public class meleeWeaponsGrabbedManager : MonoBehaviour
}
currentMeleeWeaponGrabbedInfo.weaponStored = weaponGameObject;
checkMeleeWeaponScale (currentMeleeWeaponGrabbedInfo.weaponStored.transform);
}
}
}
@@ -1599,6 +1625,8 @@ public class meleeWeaponsGrabbedManager : MonoBehaviour
newMeleeWeaponGrabbedInfo.weaponStored = newWeaponToCarry;
checkMeleeWeaponScale (newMeleeWeaponGrabbedInfo.weaponStored.transform);
newMeleeWeaponGrabbedInfo.carryingWeapon = true;
if (newMeleeWeaponGrabbedInfo.weaponStored.activeSelf) {
@@ -1794,6 +1822,18 @@ public class meleeWeaponsGrabbedManager : MonoBehaviour
return "";
}
bool useEquipShieldCheckWhenActivatingShield;
public bool isUseEquipShieldCheckWhenActivatingShieldActive ()
{
return useEquipShieldCheckWhenActivatingShield;
}
public void setUseEquipShieldCheckWhenActivatingShieldState (bool state)
{
useEquipShieldCheckWhenActivatingShield = state;
}
public bool equipShield (string shieldName)
{
return setShieldActiveState (true, shieldName);
@@ -1942,19 +1982,6 @@ public class meleeWeaponsGrabbedManager : MonoBehaviour
mainGrabbedObjectMeleeAttackSystem.setShieldActiveState (state);
if (state) {
// string currentShieldName = getCurrentShieldName ();
//
// int weaponIndex = meleeWeaponPrefabInfoList.FindIndex (s => s.Name.Equals (currentShieldName));
//
// if (weaponIndex > -1) {
//
// grabPhysicalObjectMeleeAttackSystem currentShieldAttackSystem = meleeWeaponPrefabInfoList [weaponIndex].weaponPrefab.GetComponent<grabPhysicalObjectMeleeAttackSystem> ();
//
// if (currentShieldAttackSystem != null) {
// mainGrabbedObjectMeleeAttackSystem.setShieldProtectionValues (currentShieldAttackSystem.blockDamageProtectionAmount, currentShieldAttackSystem.reducedBlockDamageProtectionAmount);
// }
// }
if (currentShieldGrabbedInfo.mainMeleeShieldObjectSystem != null) {
mainGrabbedObjectMeleeAttackSystem.setShieldProtectionValues (
currentShieldGrabbedInfo.mainMeleeShieldObjectSystem.blockDamageProtectionAmount,
@@ -2017,14 +2044,16 @@ public class meleeWeaponsGrabbedManager : MonoBehaviour
currentMeleeWeaponSheathedOrCarried = false;
}
drawOrSheatheShield (shieldState, shieldName);
drawOrSheatheShield (shieldState, shieldName, false);
// print (shieldState + " " + shieldName);
}
public void drawOrSheatheShield (bool state, string shieldName)
public void drawOrSheatheShield (bool state, string shieldName, bool ignoreSetShieldActiveState)
{
setShieldActiveState (true, shieldName);
if (!ignoreSetShieldActiveState) {
setShieldActiveState (true, shieldName);
}
mainGrabbedObjectMeleeAttackSystem.drawOrSheatheShield (state);
@@ -2856,6 +2885,58 @@ public class meleeWeaponsGrabbedManager : MonoBehaviour
}
}
void checkMeleeWeaponScale (Transform weaponTransform)
{
if (customMeleeWeaponMeshScaleActive) {
weaponTransform.localScale = Vector3.one * customMeleeWeaponMeshScale;
}
}
public void setCustomMeleeWeaponMeshScaleActive (float newValue)
{
customMeleeWeaponMeshScale = newValue;
customMeleeWeaponMeshScaleActive = (customMeleeWeaponMeshScale != 0);
}
public void setWeaponMeshScaleOnAllWeapons (float newValue)
{
setCustomMeleeWeaponMeshScaleActive (newValue);
if (meleeWeaponsGrabbedManagerActive) {
int meleeWeaponGrabbedInfoListCount = meleeWeaponGrabbedInfoList.Count;
for (int k = 0; k < meleeWeaponGrabbedInfoListCount; k++) {
meleeWeaponGrabbedInfo currentMeleeWeaponGrabbedInfo = meleeWeaponGrabbedInfoList [k];
if (currentMeleeWeaponGrabbedInfo.carryingWeapon && currentMeleeWeaponGrabbedInfo.weaponStored != null) {
//grabPhysicalObjectMeleeAttackSystem currentGrabPhysicalObjectMeleeAttackSystem =
// currentMeleeWeaponGrabbedInfo.weaponStored.GetComponent<grabPhysicalObjectMeleeAttackSystem> ();
//if (currentGrabPhysicalObjectMeleeAttackSystem != null) {
//}
currentMeleeWeaponGrabbedInfo.weaponStored.transform.localScale = Vector3.one * newValue;
}
if (currentMeleeWeaponGrabbedInfo.weaponMesh != null) {
currentMeleeWeaponGrabbedInfo.weaponMesh.transform.localScale = Vector3.one * newValue;
}
}
}
}
public void setPlaceTriggerInFrontOfCharacterOnAllAttacksState (bool state)
{
mainGrabbedObjectMeleeAttackSystem.setPlaceTriggerInFrontOfCharacterOnAllAttacksState (state);
}
public void setExtraTriggerMultiplierScaleOnAllMeleeAttacksActiveState (bool state, float value)
{
mainGrabbedObjectMeleeAttackSystem.setExtraTriggerMultiplierScaleOnAllMeleeAttacksActiveState (state, value);
}
//EDITOR FUNCTIONS
void updateComponent ()
{