Wwise Audio Integration
This commit is contained in:
parent
e7e305e6a0
commit
7d67d7ec2c
72 changed files with 4551 additions and 11819 deletions
|
|
@ -39,6 +39,12 @@ public class AetherDriveData : BehaviorData
|
|||
|
||||
[Inspectable, JsonProperty("passiveCoupling"), Key(10), RuntimeInspectable]
|
||||
public PerformanceStat PassiveCoupling;
|
||||
|
||||
[InspectableAudioParameter, JsonProperty("rpmAudio"), Key(11), RuntimeInspectable]
|
||||
public uint RpmAudioParameter;
|
||||
|
||||
[InspectableAudioParameter, JsonProperty("torqueAudio"), Key(12), RuntimeInspectable]
|
||||
public uint TorqueRatioAudioParameter;
|
||||
|
||||
public override Behavior CreateInstance(EquippedItem item)
|
||||
{
|
||||
|
|
@ -119,6 +125,10 @@ public class AetherDrive : Behavior
|
|||
var torqueRatio = actualRpmDelta / potentialRpmDelta;
|
||||
var draw = torqueRatio * Evaluate(_data.EnergyDraw) / 3;
|
||||
|
||||
Item.SetAudioParameter(SpecialAudioParameter.Intensity, max(max(_axis.x, _axis.y), _axis.z));
|
||||
Item.SetAudioParameter(_data.RpmAudioParameter, (Rpm.x + Rpm.y + Rpm.z) / 3 / MaximumRpm);
|
||||
Item.SetAudioParameter(_data.TorqueRatioAudioParameter, max(max(torqueRatio.x, torqueRatio.y), torqueRatio.z));
|
||||
|
||||
if (Entity.TryConsumeEnergy((draw.x + draw.y + draw.z)*dt))
|
||||
{
|
||||
Rpm += actualRpmDelta;
|
||||
|
|
|
|||
Loading…
Reference in a new issue