diff --git a/source/GameplayCustomizeState.hx b/source/GameplayCustomizeState.hx index 9cf8b93..c4f67cc 100644 --- a/source/GameplayCustomizeState.hx +++ b/source/GameplayCustomizeState.hx @@ -1,3 +1,5 @@ +import flixel.math.FlxMath; +import flixel.FlxCamera; import flixel.math.FlxPoint; import flixel.FlxObject; #if desktop @@ -28,13 +30,23 @@ class GameplayCustomizeState extends MusicBeatState var strumLine:FlxSprite; var strumLineNotes:FlxTypedGroup; var playerStrums:FlxTypedGroup; - - override function create() { + private var camHUD:FlxCamera; + + public override function create() { #if desktop // Updating Discord Rich Presence DiscordClient.changePresence("Customizing Gameplay", null); #end + Conductor.changeBPM(102); + persistentUpdate = true; + + super.create(); + + camHUD = new FlxCamera(); + camHUD.bgColor.alpha = 0; + FlxG.cameras.add(camHUD); + background.scrollFactor.set(0.9,0.9); curt.scrollFactor.set(0.9,0.9); front.scrollFactor.set(0.9,0.9); @@ -43,11 +55,6 @@ class GameplayCustomizeState extends MusicBeatState add(front); add(curt); - - add(sick); - - bf.playAnim('idle'); - var camFollow = new FlxObject(0, 0, 1, 1); dad = new Character(100, 100, 'dad'); @@ -59,6 +66,8 @@ class GameplayCustomizeState extends MusicBeatState add(bf); add(dad); + add(sick); + add(camFollow); FlxG.camera.follow(camFollow, LOCKON, 0.01); @@ -77,9 +86,14 @@ class GameplayCustomizeState extends MusicBeatState playerStrums = new FlxTypedGroup(); + sick.cameras = [camHUD]; + strumLine.cameras = [camHUD]; + playerStrums.cameras = [camHUD]; + generateStaticArrows(0); generateStaticArrows(1); + if (!FlxG.save.data.changedHit) { FlxG.save.data.changedHitX = defaultX; @@ -90,11 +104,17 @@ class GameplayCustomizeState extends MusicBeatState sick.y = FlxG.save.data.changedHitY; FlxG.mouse.visible = true; + } override function update(elapsed:Float) { - bf.playAnim('idle'); - dad.dance(); + if (FlxG.sound.music != null) + Conductor.songPosition = FlxG.sound.music.time; + + super.update(elapsed); + + FlxG.camera.zoom = FlxMath.lerp(0.9, FlxG.camera.zoom, 0.95); + camHUD.zoom = FlxMath.lerp(1, camHUD.zoom, 0.95); if (FlxG.mouse.overlaps(sick) && FlxG.mouse.pressed) { @@ -115,6 +135,21 @@ class GameplayCustomizeState extends MusicBeatState FlxG.sound.play(Paths.sound('cancelMenu')); FlxG.switchState(new OptionsMenu()); } + + } + + override function beatHit() + { + super.beatHit(); + + bf.playAnim('idle'); + dad.dance(); + + FlxG.camera.zoom += 0.015; + camHUD.zoom += 0.010; + + trace('beat'); + } diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 7309699..488834d 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -36,7 +36,9 @@ class MainMenuState extends MusicBeatState var newGaming2:FlxText; var newInput:Bool = true; - public static var kadeEngineVer:String = "1.3.1"; + public static var nightly:String = "-Nightly.1"; + + public static var kadeEngineVer:String = "1.3.1" + nightly; public static var gameVer:String = "0.2.7.1"; var magenta:FlxSprite; diff --git a/source/TitleState.hx b/source/TitleState.hx index c4587f2..e4d9d5b 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -300,7 +300,7 @@ class TitleState extends MusicBeatState http.onData = function (data:String) { - if (!MainMenuState.kadeEngineVer.contains(data.trim()) && !OutdatedSubState.leftState) + if (!MainMenuState.kadeEngineVer.contains(data.trim()) && !OutdatedSubState.leftState && MainMenuState.nightly == "") { trace('outdated lmao! ' + data.trim() + ' != ' + MainMenuState.kadeEngineVer); OutdatedSubState.needVer = data;