add option for camera zooming

zoom zoom or no zoom
This commit is contained in:
M&M 2021-06-11 08:56:15 -07:00
parent e77090e354
commit bfc8a4950f
4 changed files with 44 additions and 19 deletions

View File

@ -81,6 +81,9 @@ class KadeEngineData
if (FlxG.save.data.customStrumLine == null) if (FlxG.save.data.customStrumLine == null)
FlxG.save.data.customStrumLine = 0; FlxG.save.data.customStrumLine = 0;
if (FlxG.save.data.camzoom == null)
FlxG.save.data.camzoom = true;
Conductor.recalculateTimings(); Conductor.recalculateTimings();
PlayerSettings.player1.controls.loadKeyBinds(); PlayerSettings.player1.controls.loadKeyBinds();
KeyBinds.keyCheck(); KeyBinds.keyCheck();

View File

@ -614,3 +614,23 @@ class BotPlay extends Option
private override function updateDisplay():String private override function updateDisplay():String
return "BotPlay " + (FlxG.save.data.botplay ? "on" : "off"); return "BotPlay " + (FlxG.save.data.botplay ? "on" : "off");
} }
class CamZoomOption extends Option
{
public function new(desc:String)
{
super();
description = desc;
}
public override function press():Bool
{
FlxG.save.data.camzoom = !FlxG.save.data.camzoom;
display = updateDisplay();
return true;
}
private override function updateDisplay():String
{
return "Camera Zoom " + (!FlxG.save.data.camzoom ? "off" : "on");
}
}

View File

@ -39,15 +39,14 @@ class OptionsMenu extends MusicBeatState
new CustomizeGameplay("Drag'n'Drop Gameplay Modules around to your preference") new CustomizeGameplay("Drag'n'Drop Gameplay Modules around to your preference")
]), ]),
new OptionCategory("Appearance", [ new OptionCategory("Appearance", [
#if desktop
new DistractionsAndEffectsOption("Toggle stage distractions that can hinder your gameplay."), new DistractionsAndEffectsOption("Toggle stage distractions that can hinder your gameplay."),
new CamZoomOption("Toggle the camera zoom in-game."),
#if desktop
new RainbowFPSOption("Make the FPS Counter Rainbow"), new RainbowFPSOption("Make the FPS Counter Rainbow"),
new AccuracyOption("Display accuracy information."), new AccuracyOption("Display accuracy information."),
new NPSDisplayOption("Shows your current Notes Per Second."), new NPSDisplayOption("Shows your current Notes Per Second."),
new SongPositionOption("Show the songs current position (as a bar)"), new SongPositionOption("Show the songs current position (as a bar)"),
new CpuStrums("CPU's strumline lights up when a note hits it."), new CpuStrums("CPU's strumline lights up when a note hits it."),
#else
new DistractionsAndEffectsOption("Toggle stage distractions that can hinder your gameplay.")
#end #end
]), ]),

View File

@ -3458,25 +3458,28 @@ class PlayState extends MusicBeatState
// FlxG.log.add('change bpm' + SONG.notes[Std.int(curStep / 16)].changeBPM); // FlxG.log.add('change bpm' + SONG.notes[Std.int(curStep / 16)].changeBPM);
wiggleShit.update(Conductor.crochet); wiggleShit.update(Conductor.crochet);
// HARDCODING FOR MILF ZOOMS! if (FlxG.save.data.camzoom)
if (curSong.toLowerCase() == 'milf' && curBeat >= 168 && curBeat < 200 && camZooming && FlxG.camera.zoom < 1.35)
{ {
FlxG.camera.zoom += 0.015; // HARDCODING FOR MILF ZOOMS!
camHUD.zoom += 0.03; if (curSong.toLowerCase() == 'milf' && curBeat >= 168 && curBeat < 200 && camZooming && FlxG.camera.zoom < 1.35)
{
FlxG.camera.zoom += 0.015;
camHUD.zoom += 0.03;
}
if (camZooming && FlxG.camera.zoom < 1.35 && curBeat % 4 == 0)
{
FlxG.camera.zoom += 0.015;
camHUD.zoom += 0.03;
}
iconP1.setGraphicSize(Std.int(iconP1.width + 30));
iconP2.setGraphicSize(Std.int(iconP2.width + 30));
iconP1.updateHitbox();
iconP2.updateHitbox();
} }
if (camZooming && FlxG.camera.zoom < 1.35 && curBeat % 4 == 0)
{
FlxG.camera.zoom += 0.015;
camHUD.zoom += 0.03;
}
iconP1.setGraphicSize(Std.int(iconP1.width + 30));
iconP2.setGraphicSize(Std.int(iconP2.width + 30));
iconP1.updateHitbox();
iconP2.updateHitbox();
if (curBeat % gfSpeed == 0) if (curBeat % gfSpeed == 0)
{ {
gf.dance(); gf.dance();