Disable camera events in the minimal playtest.

This commit is contained in:
EliteMasterEric 2024-03-12 21:35:55 -04:00
parent 66085ff867
commit 43cf1e71e2
2 changed files with 7 additions and 1 deletions

View file

@ -57,6 +57,9 @@ class FocusCameraSongEvent extends SongEvent
// Does nothing if there is no PlayState camera or stage. // Does nothing if there is no PlayState camera or stage.
if (PlayState.instance == null || PlayState.instance.currentStage == null) return; if (PlayState.instance == null || PlayState.instance.currentStage == null) return;
// Does nothing if we are minimal mode.
if (PlayState.instance.minimalMode) return;
var posX:Null<Float> = data.getFloat('x'); var posX:Null<Float> = data.getFloat('x');
if (posX == null) posX = 0.0; if (posX == null) posX = 0.0;
var posY:Null<Float> = data.getFloat('y'); var posY:Null<Float> = data.getFloat('y');

View file

@ -55,7 +55,10 @@ class ZoomCameraSongEvent extends SongEvent
public override function handleEvent(data:SongEventData):Void public override function handleEvent(data:SongEventData):Void
{ {
// Does nothing if there is no PlayState camera or stage. // Does nothing if there is no PlayState camera or stage.
if (PlayState.instance == null) return; if (PlayState.instance == null || PlayState.instance.currentStage == null) return;
// Does nothing if we are minimal mode.
if (PlayState.instance.minimalMode) return;
var zoom:Null<Float> = data.getFloat('zoom'); var zoom:Null<Float> = data.getFloat('zoom');
if (zoom == null) zoom = 1.0; if (zoom == null) zoom = 1.0;