-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3c8dd84
commit 94247b7
Showing
5 changed files
with
34 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
using System; | ||
using Nautilus.Utility; | ||
|
||
namespace SCHIZO.Sounds.Collections; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters