prerelease
This commit is contained in:
@@ -81,6 +81,11 @@ internal sealed class EngineStreamEditor : Widget, IAssetInspector
|
||||
picker.OnAssetPicked += asset => CreateStreamEditor( asset[0].LoadResource<EngineStream>() );
|
||||
picker.Show();
|
||||
};
|
||||
var saveButton = a.Add( new Button( "Save File" ), 0 );
|
||||
saveButton.Clicked = () =>
|
||||
{
|
||||
ActiveStream.StateHasChanged();
|
||||
};
|
||||
}
|
||||
Layout RightLayout;
|
||||
SimulatedEngineWidget SimulatedEngineWidget;
|
||||
|
||||
@@ -76,7 +76,7 @@ internal sealed class SimulatedEngineWidget : Widget
|
||||
[EditorEvent.Frame]
|
||||
public void OnFrame()
|
||||
{
|
||||
if ( Player.Stream is null )
|
||||
if ( Player is null || !Player.Stream.IsValid() )
|
||||
return;
|
||||
Player.EngineState = IsPlaying ? EngineState.Running : EngineState.Off;
|
||||
|
||||
@@ -85,7 +85,7 @@ internal sealed class SimulatedEngineWidget : Widget
|
||||
IsRedlining = RPM.Value == 1 && !IsRedlining;
|
||||
Player.IsRedlining = IsRedlining;
|
||||
|
||||
Player.Update( Time.Delta, Vector3.Zero, true );
|
||||
Player?.Update( Time.Delta, Vector3.Zero, true );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user