Skip to content

Commit

Permalink
I am dumb, actually fix camera this time
Browse files Browse the repository at this point in the history
  • Loading branch information
superpowers04 committed Aug 15, 2024
1 parent df5d440 commit 9c2541d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,16 @@ class PlayState extends ScriptMusicBeatState
public var camBeat:Bool = true;
public var cachedChars:Array<Map<String,Character>> = [[],[],[]];
public var controlCamera:Bool = true;
public var camMoveSpeed(default,set):Float = 0.01;
public function set_camMoveSpeed(v):Float{
moveCamera = moveCamera;
return camMoveSpeed = v;
}

public var moveCamera(default,set):Bool = true;
public function set_moveCamera(v):Bool{
if(v){
FlxG.camera.follow(camFollow, LOCKON, 0.25);
FlxG.camera.follow(camFollow, LOCKON, camMoveSpeed);
}else{
FlxG.camera.follow(null);
}
Expand Down Expand Up @@ -1316,6 +1322,7 @@ class PlayState extends ScriptMusicBeatState

FlxG.sound.music.pause();
vocals.pause();
vocals.group = FlxG.sound.music.group;
FlxG.sound.music.onComplete = endSong;

// Song duration in a float, useful for the time left feature
Expand Down
5 changes: 5 additions & 0 deletions source/se/states/ModRepoState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ typedef RepoAsset = {
}
changeSelection();
}
override function ret(){

FlxG.sound.play(Paths.sound('cancelMenu'));
FlxG.switchState(new MainMenuState());
}
override function select(i:Int = 0){
if(grpSongs.members[i] == null || grpSongs.members[i].menuValue == null){
showTempmessage('No asset associated with that menu item',0xFFFF0000);
Expand Down

0 comments on commit 9c2541d

Please sign in to comment.