commit
This commit is contained in:
parent
69ee9f0a01
commit
0875012c2f
@ -1,3 +1,5 @@
|
|||||||
|
import flixel.math.FlxMath;
|
||||||
|
import flixel.FlxCamera;
|
||||||
import flixel.math.FlxPoint;
|
import flixel.math.FlxPoint;
|
||||||
import flixel.FlxObject;
|
import flixel.FlxObject;
|
||||||
#if desktop
|
#if desktop
|
||||||
@ -28,13 +30,23 @@ class GameplayCustomizeState extends MusicBeatState
|
|||||||
var strumLine:FlxSprite;
|
var strumLine:FlxSprite;
|
||||||
var strumLineNotes:FlxTypedGroup<FlxSprite>;
|
var strumLineNotes:FlxTypedGroup<FlxSprite>;
|
||||||
var playerStrums:FlxTypedGroup<FlxSprite>;
|
var playerStrums:FlxTypedGroup<FlxSprite>;
|
||||||
|
private var camHUD:FlxCamera;
|
||||||
|
|
||||||
override function create() {
|
public override function create() {
|
||||||
#if desktop
|
#if desktop
|
||||||
// Updating Discord Rich Presence
|
// Updating Discord Rich Presence
|
||||||
DiscordClient.changePresence("Customizing Gameplay", null);
|
DiscordClient.changePresence("Customizing Gameplay", null);
|
||||||
#end
|
#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);
|
background.scrollFactor.set(0.9,0.9);
|
||||||
curt.scrollFactor.set(0.9,0.9);
|
curt.scrollFactor.set(0.9,0.9);
|
||||||
front.scrollFactor.set(0.9,0.9);
|
front.scrollFactor.set(0.9,0.9);
|
||||||
@ -43,11 +55,6 @@ class GameplayCustomizeState extends MusicBeatState
|
|||||||
add(front);
|
add(front);
|
||||||
add(curt);
|
add(curt);
|
||||||
|
|
||||||
|
|
||||||
add(sick);
|
|
||||||
|
|
||||||
bf.playAnim('idle');
|
|
||||||
|
|
||||||
var camFollow = new FlxObject(0, 0, 1, 1);
|
var camFollow = new FlxObject(0, 0, 1, 1);
|
||||||
|
|
||||||
dad = new Character(100, 100, 'dad');
|
dad = new Character(100, 100, 'dad');
|
||||||
@ -59,6 +66,8 @@ class GameplayCustomizeState extends MusicBeatState
|
|||||||
add(bf);
|
add(bf);
|
||||||
add(dad);
|
add(dad);
|
||||||
|
|
||||||
|
add(sick);
|
||||||
|
|
||||||
add(camFollow);
|
add(camFollow);
|
||||||
|
|
||||||
FlxG.camera.follow(camFollow, LOCKON, 0.01);
|
FlxG.camera.follow(camFollow, LOCKON, 0.01);
|
||||||
@ -77,9 +86,14 @@ class GameplayCustomizeState extends MusicBeatState
|
|||||||
|
|
||||||
playerStrums = new FlxTypedGroup<FlxSprite>();
|
playerStrums = new FlxTypedGroup<FlxSprite>();
|
||||||
|
|
||||||
|
sick.cameras = [camHUD];
|
||||||
|
strumLine.cameras = [camHUD];
|
||||||
|
playerStrums.cameras = [camHUD];
|
||||||
|
|
||||||
generateStaticArrows(0);
|
generateStaticArrows(0);
|
||||||
generateStaticArrows(1);
|
generateStaticArrows(1);
|
||||||
|
|
||||||
|
|
||||||
if (!FlxG.save.data.changedHit)
|
if (!FlxG.save.data.changedHit)
|
||||||
{
|
{
|
||||||
FlxG.save.data.changedHitX = defaultX;
|
FlxG.save.data.changedHitX = defaultX;
|
||||||
@ -90,11 +104,17 @@ class GameplayCustomizeState extends MusicBeatState
|
|||||||
sick.y = FlxG.save.data.changedHitY;
|
sick.y = FlxG.save.data.changedHitY;
|
||||||
|
|
||||||
FlxG.mouse.visible = true;
|
FlxG.mouse.visible = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override function update(elapsed:Float) {
|
override function update(elapsed:Float) {
|
||||||
bf.playAnim('idle');
|
if (FlxG.sound.music != null)
|
||||||
dad.dance();
|
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)
|
if (FlxG.mouse.overlaps(sick) && FlxG.mouse.pressed)
|
||||||
{
|
{
|
||||||
@ -115,6 +135,21 @@ class GameplayCustomizeState extends MusicBeatState
|
|||||||
FlxG.sound.play(Paths.sound('cancelMenu'));
|
FlxG.sound.play(Paths.sound('cancelMenu'));
|
||||||
FlxG.switchState(new OptionsMenu());
|
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');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,7 +36,9 @@ class MainMenuState extends MusicBeatState
|
|||||||
var newGaming2:FlxText;
|
var newGaming2:FlxText;
|
||||||
var newInput:Bool = true;
|
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";
|
public static var gameVer:String = "0.2.7.1";
|
||||||
|
|
||||||
var magenta:FlxSprite;
|
var magenta:FlxSprite;
|
||||||
|
@ -300,7 +300,7 @@ class TitleState extends MusicBeatState
|
|||||||
|
|
||||||
http.onData = function (data:String) {
|
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);
|
trace('outdated lmao! ' + data.trim() + ' != ' + MainMenuState.kadeEngineVer);
|
||||||
OutdatedSubState.needVer = data;
|
OutdatedSubState.needVer = data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user