prerelease

This commit is contained in:
2025-11-06 12:13:30 +07:00
parent 0905876b99
commit ae5cd2c8b6
48 changed files with 3753 additions and 1404 deletions

View File

@@ -4,7 +4,8 @@ using VeloX.Audio;
namespace VeloX;
[GameResource( "Engine Stream", "engstr", "Engine Sound", Category = "VeloX", Icon = "time_to_leave" )]
[AssetType( Name = "Engine Stream", Extension = "engstr", Category = "VeloX" )]
[Icon( "time_to_leave" )]
public sealed class EngineStream : GameResource
{
public sealed class Layer

View File

@@ -26,6 +26,7 @@ public class EngineStreamPlayer( EngineStream stream ) : IDisposable
public void Update( float deltaTime, Vector3 position, bool isLocal = false )
{
var globalPitch = 1.0f;
// Gear wobble effect
@@ -50,14 +51,14 @@ public class EngineStreamPlayer( EngineStream stream ) : IDisposable
foreach ( var (id, layer) in Stream.Layers )
{
EngineSounds.TryGetValue( layer, out var channel );
if ( !channel.IsValid() )
if ( !channel.IsValid() && layer.AudioPath.IsValid() )
{
channel = Sound.PlayFile( layer.AudioPath );
EngineSounds[layer] = channel;
}
if ( channel.Paused && (EngineSoundPaused || layer.IsMuted) )
if ( !channel.IsValid() || channel.Paused && (EngineSoundPaused || layer.IsMuted) )
continue;
// Reset controller outputs