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

@@ -884,7 +884,7 @@ public class playerWeaponsManager : MonoBehaviour
!currentIKWeapon.isReloadingWeapon () &&
!weaponsAreMoving ()) {
int currentNumberInput = playerInput.checkNumberInput (weaponsSlotsAmount);
int currentNumberInput = checkNumberInput (weaponsSlotsAmount);
if (currentNumberInput > -1) {
if (canUseInput ()) {
@@ -2718,6 +2718,11 @@ public class playerWeaponsManager : MonoBehaviour
}
}
public int checkNumberInput (int numberAmount)
{
return playerInput.checkNumberInput (numberAmount);
}
public bool isPlayerOnGround ()
{
return playerOnGround;
@@ -3997,11 +4002,47 @@ public class playerWeaponsManager : MonoBehaviour
return "";
}
public string getWeaponAmmoNameByWeaponName (string weaponName)
{
updateWeaponListCount ();
for (int k = 0; k < weaponListCount; k++) {
if (showDebugLog) {
print (weaponsList [k].getWeaponName () + " " + weaponName);
}
if (weaponsList [k].getWeaponName ().Equals (weaponName)) {
return weaponsList [k].getWeaponAmmoName ();
}
}
return "";
}
public string getCurrentWeaponName ()
{
return currentWeaponName;
}
public int getWeaponOriginalClipSize (string weaponName)
{
updateWeaponListCount ();
for (int k = 0; k < weaponListCount; k++) {
if (showDebugLog) {
print (weaponsList [k].getWeaponName () + " " + weaponName);
}
if (weaponsList [k].getWeaponName ().Equals (weaponName)) {
return weaponsList [k].getWeaponOriginalClipSize ();
}
}
return -1;
}
public bool canWeaponsBeStolenFromCharacter ()
{
return weaponsCanBeStolenFromCharacter;
@@ -4796,6 +4837,19 @@ public class playerWeaponsManager : MonoBehaviour
}
}
public void updateWeaponsParentsInRuntime (Transform parent, Animator mainAnimtor)
{
updateWeaponListCount ();
for (int k = 0; k < weaponListCount; k++) {
IKWeaponSystem currentWeapon = weaponsList [k];
currentWeapon.setHandTransform (rightHandTransform, leftHandTransform, rightHandMountPoint, leftHandMountPoint);
currentWeapon.getWeaponSystemManager ().updateWeaponParentInRuntime (parent, mainAnimtor);
}
}
public void checkWeaponStateOnEmptyAmmo ()
{
if (removeCurrentWeaponAsNotUsableIfAmmoEmptyEnabled) {
@@ -5109,6 +5163,10 @@ public class playerWeaponsManager : MonoBehaviour
targetRotation = 0;
} else {
targetRotation = newWeapon.extraRotation;
if (!ignoreNewAnimatorWeaponIDSettings && newWeapon.setNewAnimatorWeaponID) {
targetRotation = 0;
}
}
setUpperBodyBendingMultiplier = newWeapon.setUpperBodyBendingMultiplier;
@@ -5242,6 +5300,11 @@ public class playerWeaponsManager : MonoBehaviour
return ignoreNewAnimatorWeaponIDSettings;
}
public void setIgnoreNewAnimatorWeaponIDSettingsState (bool state)
{
ignoreNewAnimatorWeaponIDSettings = state;
}
//used in third person to enable or disable the player's spine rotation
public void activateOrDeactivateAimMode (bool state)
{
@@ -7314,6 +7377,47 @@ public class playerWeaponsManager : MonoBehaviour
originalWeaponsRotationFirstPerson = weaponsTransformInFirstPerson.localRotation;
}
public void resetWeaponsTransformInThirdPersonToPlayerPosition ()
{
weaponsTransformInThirdPerson.position = transform.position;
weaponsTransformInThirdPerson.rotation = transform.rotation;
}
public void resetWeaponsParentToPlayerPosition ()
{
weaponsParent.position = transform.position;
weaponsParent.rotation = transform.rotation;
}
public void updateWeaponsParentAndLocalPosition ()
{
bool isFirstPerson = isFirstPersonActive ();
if (isFirstPerson) {
weaponsParent.SetParent (firstPersonParent);
//weaponsParent.localRotation = originalWeaponsRotationFirstPerson;
//weaponsParent.localPosition = originalWeaponsPositionFirstPerson;
} else {
if (fullBodyAwarenessActive) {
weaponsParent.SetParent (currentPivotCameraTransform);
weaponsParent.localRotation = Quaternion.identity;
weaponsParent.localPosition = fullBodyAwarenessWeaponsParentOffsetPosition;
} else {
weaponsParent.SetParent (thirdPersonParent);
//weaponsParent.localPosition = originalWeaponsPositionThirdPerson;
//weaponsParent.localRotation = originalWeaponsRotationThirdPerson;
}
}
if (Application.isPlaying) {
getComponents ();
}
}
public Transform getTemporalParentForWeapons ()
{
return temporalParentForWeapons;
@@ -7455,6 +7559,10 @@ public class playerWeaponsManager : MonoBehaviour
updateWeaponListCount ();
string ignoreRaycastLayer = "Ignore Raycast";
int ignoreRaycastLayerIndex = LayerMask.NameToLayer (ignoreRaycastLayer);
for (int k = 0; k < weaponListCount; k++) {
playerWeaponSystem currentPlayerWeaponSystem = weaponsList [k].getWeaponSystemManager ();
@@ -7462,8 +7570,9 @@ public class playerWeaponsManager : MonoBehaviour
if (!isFullBodyAwarenessActive () && !playerCameraManager.isFullBodyAwarenessEnabled ()) {
Component [] components = currentPlayerWeaponSystem.weaponSettings.weaponMesh.GetComponentsInChildren (typeof (Transform));
foreach (Transform child in components) {
if (!child.gameObject.layer.Equals (newLayerIndex)) {
if (!child.gameObject.layer.Equals (newLayerIndex) && !child.gameObject.layer.Equals (ignoreRaycastLayerIndex)) {
child.gameObject.layer = newLayerIndex;
}
}
@@ -7527,15 +7636,21 @@ public class playerWeaponsManager : MonoBehaviour
string newLayer = "Default";
int newLayerIndex = LayerMask.NameToLayer (newLayer);
if (firstPersonActive) {
newLayer = weaponsLayer;
}
int newLayerIndex = LayerMask.NameToLayer (newLayer);
string ignoreRaycastLayer = "Ignore Raycast";
int ignoreRaycastLayerIndex = LayerMask.NameToLayer (ignoreRaycastLayer);
Component [] components = weaponPart.GetComponentsInChildren (typeof (Transform));
foreach (Component c in components) {
if (!c.gameObject.layer.Equals (newLayerIndex)) {
if (!c.gameObject.layer.Equals (newLayerIndex) && !c.gameObject.layer.Equals (ignoreRaycastLayerIndex)) {
c.gameObject.layer = newLayerIndex;
}
}
@@ -10100,6 +10215,13 @@ public class playerWeaponsManager : MonoBehaviour
}
}
public void stopAimIfActive ()
{
if (isAimingWeapons ()) {
setAimWeaponState (false);
}
}
public void setAimWeaponState (bool aimingWeapon)
{
setAimModeInputPressedState (aimingWeapon);
@@ -11320,6 +11442,14 @@ public class playerWeaponsManager : MonoBehaviour
//EDITOR FUNCTIONS
public void setIgnoreNewAnimatorWeaponIDSettingsStateFromEditor (bool state)
{
setIgnoreNewAnimatorWeaponIDSettingsState (state);
updateComponent (true);
}
public void instantiateUsableWeaponPrefabInfoListFromEditor ()
{
if (useUsableWeaponPrefabInfoList) {
@@ -11710,15 +11840,20 @@ public class playerWeaponsManager : MonoBehaviour
for (int k = 0; k < weaponListCount; k++) {
if (weaponsList [k] != null) {
weaponTransformInfoSystem currentweaponTransformInfoSystem = weaponsList [k].gameObject.GetComponent<weaponTransformInfoSystem> ();
weaponTransformInfoSystem currentWeaponTransformInfoSystem = weaponsList [k].gameObject.GetComponent<weaponTransformInfoSystem> ();
if (currentweaponTransformInfoSystem != null) {
currentweaponTransformInfoSystem.setCurrentOffsetParentOnThirdPersonWithOffsetValue (currentOffsetParentThirdPerson);
if (currentWeaponTransformInfoSystem != null) {
currentWeaponTransformInfoSystem.setCurrentOffsetParentOnThirdPersonWithOffsetValue (currentOffsetParentThirdPerson);
}
}
}
}
public void setCurrentOffsetParentThirdPersonValues (Vector3 newValue)
{
currentOffsetParentThirdPerson = newValue;
}
public void adjustDrawKeepPositionToWeaponPositionOnAllWeapons ()
{
weaponListCount = weaponsList.Count;
@@ -11734,6 +11869,29 @@ public class playerWeaponsManager : MonoBehaviour
}
}
public void setWeaponMeshScaleOnAllWeapons (float newValue)
{
weaponListCount = weaponsList.Count;
for (int k = 0; k < weaponListCount; k++) {
if (weaponsList [k] != null) {
weaponsList [k].setWeaponMeshScale (newValue);
}
}
}
public void adjustAllFireWeaponTransformReferencePositionOnAllWeapons (float newValue)
{
weaponListCount = weaponsList.Count;
for (int k = 0; k < weaponListCount; k++) {
if (weaponsList [k] != null) {
weaponsList [k].adjustAllFireWeaponTransformReferencePosition (newValue);
}
}
}
public void setWeaponsHUDEnabledStateFromEditor (bool state)
{
setWeaponsHUDEnabledState (state);