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

@@ -46,6 +46,10 @@ public class findObjectivesSystem : MonoBehaviour
public bool ignoreOnTriggerEnterAndExitOnMainAIObjectEnabled;
[Space]
public bool ignoreIfTargetVisibleWithRaycastEnabled;
[Space]
[Header ("Attack On Place Settings")]
[Space]
@@ -1215,7 +1219,7 @@ public class findObjectivesSystem : MonoBehaviour
{
locked2_5dModeActive = state;
playerControllerManager.setLockedCameraState (state, false, true, false);
playerControllerManager.setLockedCameraState (state, false, true, false, false);
playerControllerManager.set3dOr2_5dWorldType (!state);
@@ -1991,6 +1995,10 @@ public class findObjectivesSystem : MonoBehaviour
public bool checkIfTargetVisible (float raycastDistance)
{
if (ignoreIfTargetVisibleWithRaycastEnabled) {
return true;
}
Vector3 raycastDirection = placeToShoot.position - rayCastPosition.position;
if (raycastDistance == 0) {
@@ -2263,7 +2271,7 @@ public class findObjectivesSystem : MonoBehaviour
lookAtTargetSpeed = newValue;
}
public bool checkCharacterFaction (GameObject character, bool damageReceived)
public bool checkCharacterFaction (GameObject character, bool damageReceived, bool ignoreAddVehicleDriverAsEnemy)
{
if (character == null) {
return false;
@@ -2336,6 +2344,10 @@ public class findObjectivesSystem : MonoBehaviour
isEnemy = false;
}
if (ignoreAddVehicleDriverAsEnemy) {
return isEnemy;
}
if (isEnemy) {
addEnemy (currentDriver);
@@ -2371,7 +2383,7 @@ public class findObjectivesSystem : MonoBehaviour
}
if (canCheckSuspect (currentSuspect.layer)) {
if (!onSpotted && posibleThreat == null && checkCharacterFaction (currentSuspect, false)) {
if (!onSpotted && posibleThreat == null && checkCharacterFaction (currentSuspect, false, false)) {
if (targetIsDriving || applyDamage.isVehicle (currentSuspect)) {
targetIsDriving = false;
targetIsVehicle = true;
@@ -2416,7 +2428,9 @@ public class findObjectivesSystem : MonoBehaviour
void cancelCheckPossibleThreatValues (GameObject currentSuspect)
{
if (!onSpotted && possibleThreatDetected && canCheckSuspect (currentSuspect.layer) && checkCharacterFaction (currentSuspect, false)) {
if (!onSpotted && possibleThreatDetected && canCheckSuspect (currentSuspect.layer) &&
checkCharacterFaction (currentSuspect, false, false)) {
resetCheckThreatValues ();
}
}
@@ -2424,7 +2438,7 @@ public class findObjectivesSystem : MonoBehaviour
//the sphere collider with the trigger of the turret has detected an enemy, so it is added to the list of enemies
void enemyDetected (GameObject col)
{
if (checkCharacterFaction (col, false)) {
if (checkCharacterFaction (col, false, false)) {
addEnemy (col.gameObject);
}
}
@@ -2463,6 +2477,14 @@ public class findObjectivesSystem : MonoBehaviour
return;
}
if (attacker == AIGameObject) {
if (showDebugPrint) {
print ("trying to checkShootOrigin on AI produced by the AI it self, cancelling");
}
return;
}
if (useMaxDistanceRangeToDetectTargets) {
if (GKC_Utils.distance (attacker.transform.position, AITransform.position) > maxDistanceRangeToDetectTargets) {
if (showDebugPrint) {
@@ -2473,7 +2495,7 @@ public class findObjectivesSystem : MonoBehaviour
}
}
if (checkCharacterFaction (attacker, true)) {
if (checkCharacterFaction (attacker, true, false)) {
addEnemy (attacker);
factionManager.addDetectedEnemyFromFaction (attacker);
@@ -3747,6 +3769,13 @@ public class findObjectivesSystem : MonoBehaviour
}
}
public void setIgnoreRandomWalkActiveState (bool state)
{
if (currentAIBehaviorAssigned) {
currentAIBehavior.setIgnoreRandomWalkActiveState (state);
}
}
//Functions to use the powers
public void updatePowersBehavior ()
{
@@ -4065,7 +4094,7 @@ public class findObjectivesSystem : MonoBehaviour
return;
}
if (checkCharacterFaction (col.gameObject, false)) {
if (checkCharacterFaction (col.gameObject, false, false)) {
addEnemy (col.gameObject);
} else {
addNotEnemy (col.gameObject);
@@ -4097,13 +4126,13 @@ public class findObjectivesSystem : MonoBehaviour
print (factionManager.checkIfCharacterBelongsToFaction (factionToFollowAsPartner, objectToCheck));
print (checkCharacterFaction (objectToCheck, false));
//print (checkCharacterFaction (objectToCheck, false));
print ("\n \n \n");
}
if (factionManager.checkIfCharacterBelongsToFaction (factionToFollowAsPartner, objectToCheck) && !partnerFound) {
if (!checkCharacterFaction (objectToCheck, false)) {
if (!checkCharacterFaction (objectToCheck, false, false)) {
if (followPartnerOnTrigger) {
if (useEventOnPartnerFound && !onSpotted) {
eventOnPartnerFound.Invoke ();
@@ -4138,7 +4167,7 @@ public class findObjectivesSystem : MonoBehaviour
}
}
} else {
if (checkCharacterFaction (col.gameObject, false)) {
if (checkCharacterFaction (col.gameObject, false, true)) {
enemyLost (col.gameObject);
} else {
removeNotEnemy (col.gameObject);
@@ -4458,6 +4487,11 @@ public class findObjectivesSystem : MonoBehaviour
originalMinDistanceToMelee = newValue;
}
public void setMinDistanceToEnemyUsingMelee (float newValue)
{
minDistanceToEnemyUsingMelee = newValue;
}
public void checkCharactersAroundAI ()
{
int notEnemiesCount = notEnemies.Count;
@@ -4628,6 +4662,23 @@ public class findObjectivesSystem : MonoBehaviour
}
}
public void checkAIStateToResetIfModelSwapped ()
{
if (!Application.isPlaying) {
return;
}
clearFullEnemiesList ();
removeCharacterAsTargetOnSameFaction ();
resetAITargets ();
removeTargetInfo ();
checkAIBehaviorStateOnCharacterSpawn ();
}
public void forceFovTriggerToDetectAnythingAround ()
{
fovTrigger.enabled = false;
@@ -4938,6 +4989,13 @@ public class findObjectivesSystem : MonoBehaviour
}
}
public void stopCurrentAbilityAttackInProcess ()
{
if (useAbilitiesBehavior) {
abilitiesAIBehavior.stopCurrentAttackInProcess ();
}
}
public bool isAIBehaviorAttackInProcess ()
{
if (currentAIBehaviorAssigned) {
@@ -5021,7 +5079,19 @@ public class findObjectivesSystem : MonoBehaviour
return 0;
}
public void setCheckForExtraCollidersOnOwnerIfDetectedState (bool state)
{
checkForExtraCollidersOnOwnerIfDetected = state;
}
//EDITOR FUNCTIONS
public void setCheckForExtraCollidersOnOwnerIfDetectedStateFromEditor (bool state)
{
setCheckForExtraCollidersOnOwnerIfDetectedState (state);
updateComponent ();
}
public void setExtraFieldOfViewRadiusOnSpotFromEditor (float newValue)
{
extraFieldOfViewRadiusOnSpot = newValue;