diff --git a/SCHIZO/Creatures/Ermshark/ErmsharkAttack.cs b/SCHIZO/Creatures/Ermshark/ErmsharkAttack.cs index d1516ac4..b2523c93 100644 --- a/SCHIZO/Creatures/Ermshark/ErmsharkAttack.cs +++ b/SCHIZO/Creatures/Ermshark/ErmsharkAttack.cs @@ -1,5 +1,4 @@ using System.Linq; -using Nautilus.Utility; using SCHIZO.Creatures.Components; using SCHIZO.Helpers; using UnityEngine; diff --git a/SCHIZO/Helpers/CreatureActionHelpers.cs b/SCHIZO/Helpers/CreatureActionHelpers.cs new file mode 100644 index 00000000..759e7c40 --- /dev/null +++ b/SCHIZO/Helpers/CreatureActionHelpers.cs @@ -0,0 +1,34 @@ +using UnityEngine; + +namespace SCHIZO.Helpers; + +public static class CreatureActionHelpers +{ +#if SUBNAUTICA + public static float Evaluate(this CreatureAction action, float time) + => action.Evaluate(action.creature, time); + public static void StartPerform(this CreatureAction action, float time) + => action.StartPerform(action.creature, time); + public static void Perform(this CreatureAction action, float time, float deltaTime) + => action.Perform(action.creature, time, deltaTime); + public static void StopPerform(this CreatureAction action, float time) + => action.StopPerform(action.creature, time); +#endif + + public static float Evaluate(this CreatureAction action) + => action.Evaluate(Time.time); + public static void StartPerform(this CreatureAction action) + => action.StartPerform(Time.time); + public static void Perform(this CreatureAction action) + => action.Perform(Time.time, Time.deltaTime); + public static void StopPerform(this CreatureAction action) + => action.StopPerform(Time.time); + +#if BELOWZERO + public static FMOD_CustomEmitter GetBiteSound(this MeleeAttack attack) + => attack.biteSound; +#else + public static FMOD_StudioEventEmitter GetBiteSound(this MeleeAttack attack) + => attack.attackSound; +#endif +} diff --git a/SCHIZO/Helpers/RetargetHelpers.cs b/SCHIZO/Helpers/RetargetHelpers.cs index 08d296f8..5d2f83d0 100644 --- a/SCHIZO/Helpers/RetargetHelpers.cs +++ b/SCHIZO/Helpers/RetargetHelpers.cs @@ -1,5 +1,4 @@ using System.Runtime.CompilerServices; -using UnityEngine; namespace SCHIZO.Helpers; @@ -20,36 +19,4 @@ public static return belowZero; #endif } -#if BELOWZERO - public static float Evaluate(this CreatureAction action, Creature creature, float time) - => action.Evaluate(time); - public static void StartPerform(this CreatureAction action, Creature creature, float time) - => action.StartPerform(time); - public static void Perform(this CreatureAction action, Creature creature, float time, float deltaTime) - => action.Perform(time, deltaTime); - public static void StopPerform(this CreatureAction action, Creature creature, float time) - => action.StopPerform(time); - public static FMOD_CustomEmitter GetBiteSound(this MeleeAttack attack) - => attack.biteSound; -#else - public static float Evaluate(this CreatureAction action, float time) - => action.Evaluate(action.creature, time); - public static void StartPerform(this CreatureAction action, float time) - => action.StartPerform(action.creature, time); - public static void Perform(this CreatureAction action, float time, float deltaTime) - => action.Perform(action.creature, time, deltaTime); - public static void StopPerform(this CreatureAction action, float time) - => action.StopPerform(action.creature, time); - public static FMOD_StudioEventEmitter GetBiteSound(this MeleeAttack attack) - => attack.attackSound; -#endif - public static float Evaluate(this CreatureAction action) - => action.Evaluate(Time.time); - public static void StartPerform(this CreatureAction action) - => action.StartPerform(action.creature, Time.time); - public static void Perform(this CreatureAction action) - => action.Perform(action.creature, Time.time, Time.deltaTime); - public static void StopPerform(this CreatureAction action) - => action.StopPerform(action.creature, Time.time); - } diff --git a/SCHIZO/Sounds/Collections/SoundCollectionInstance.cs b/SCHIZO/Sounds/Collections/SoundCollectionInstance.cs index 2dabc5a9..01c6c597 100644 --- a/SCHIZO/Sounds/Collections/SoundCollectionInstance.cs +++ b/SCHIZO/Sounds/Collections/SoundCollectionInstance.cs @@ -1,5 +1,4 @@ using System; -using Nautilus.Utility; namespace SCHIZO.Sounds.Collections; diff --git a/SCHIZO/Sounds/FMODSoundCollection.cs b/SCHIZO/Sounds/FMODSoundCollection.cs index 897156b0..777ce769 100644 --- a/SCHIZO/Sounds/FMODSoundCollection.cs +++ b/SCHIZO/Sounds/FMODSoundCollection.cs @@ -4,7 +4,6 @@ using FMOD; using FMOD.Studio; using FMODUnity; -using Nautilus.FMod.Interfaces; using Nautilus.Handlers; using Nautilus.Utility; using SCHIZO.DataStructures;