diff --git a/Project.xml b/Project.xml
index 9516b71..eeffad6 100644
--- a/Project.xml
+++ b/Project.xml
@@ -123,7 +123,7 @@
-
+
diff --git a/source/Character.hx b/source/Character.hx
index e4c64ae..b9bc7f8 100644
--- a/source/Character.hx
+++ b/source/Character.hx
@@ -407,7 +407,7 @@ class Character extends FlxSprite
public function loadOffsetFile(character:String)
{
- var offset:Array = CoolUtil.coolTextFile(Paths.txt('images/characters/' + character + "Offsets"));
+ var offset:Array = CoolUtil.coolTextFile(Paths.txt('images/characters/' + character + "Offsets", 'shared'));
for (i in 0...offset.length)
{
@@ -452,13 +452,13 @@ class Character extends FlxSprite
/**
* FOR GF DANCING SHIT
*/
- public function dance()
+ public function dance(forced:Bool = false)
{
if (!debugMode)
{
switch (curCharacter)
{
- case 'gf':
+ case 'gf' | 'gf-christmas' | 'gf-car' | 'gf-pixel':
if (!animation.curAnim.name.startsWith('hair'))
{
danced = !danced;
@@ -468,39 +468,6 @@ class Character extends FlxSprite
else
playAnim('danceLeft');
}
-
- case 'gf-christmas':
- if (!animation.curAnim.name.startsWith('hair'))
- {
- danced = !danced;
-
- if (danced)
- playAnim('danceRight');
- else
- playAnim('danceLeft');
- }
-
- case 'gf-car':
- if (!animation.curAnim.name.startsWith('hair'))
- {
- danced = !danced;
-
- if (danced)
- playAnim('danceRight');
- else
- playAnim('danceLeft');
- }
- case 'gf-pixel':
- if (!animation.curAnim.name.startsWith('hair'))
- {
- danced = !danced;
-
- if (danced)
- playAnim('danceRight');
- else
- playAnim('danceLeft');
- }
-
case 'spooky':
danced = !danced;
@@ -509,7 +476,7 @@ class Character extends FlxSprite
else
playAnim('danceLeft');
default:
- playAnim('idle');
+ playAnim('idle', forced);
}
}
}
diff --git a/source/GameplayCustomizeState.hx b/source/GameplayCustomizeState.hx
index 2748e85..56e00f4 100644
--- a/source/GameplayCustomizeState.hx
+++ b/source/GameplayCustomizeState.hx
@@ -52,7 +52,7 @@ class GameplayCustomizeState extends MusicBeatState
curt = new FlxSprite(-500, -300).loadGraphic(Paths.image('stagecurtains','shared'));
front = new FlxSprite(-650, 600).loadGraphic(Paths.image('stagefront','shared'));
- Conductor.changeBPM(102);
+ //Conductor.changeBPM(102);
persistentUpdate = true;
super.create();
@@ -193,8 +193,9 @@ class GameplayCustomizeState extends MusicBeatState
{
super.beatHit();
- bf.playAnim('idle');
- dad.dance();
+ bf.playAnim('idle', true);
+ dad.dance(true);
+ gf.dance();
FlxG.camera.zoom += 0.015;
camHUD.zoom += 0.010;
diff --git a/source/Paths.hx b/source/Paths.hx
index 5d7b07a..69adc31 100644
--- a/source/Paths.hx
+++ b/source/Paths.hx
@@ -53,7 +53,7 @@ class Paths
return 'assets/$file';
}
- inline static public function file(file:String, type:AssetType = TEXT, ?library:String)
+ inline static public function file(file:String, ?library:String, type:AssetType = TEXT)
{
return getPath(file, type, library);
}
@@ -142,7 +142,7 @@ class Paths
return null;
#end
else
- return FlxAtlasFrames.fromSparrow(image('characters/$key'), file('images/characters/$key.xml'));
+ return FlxAtlasFrames.fromSparrow(image('characters/$key', library), file('images/characters/$key.xml', library));
return FlxAtlasFrames.fromSparrow(image(key, library), file('images/$key.xml', library));
}
@@ -169,7 +169,7 @@ class Paths
return null;
#end
else
- return FlxAtlasFrames.fromSpriteSheetPacker(image('characters/$key'), file('images/characters/$key.txt'));
+ return FlxAtlasFrames.fromSpriteSheetPacker(image('characters/$key'), file('images/characters/$key.txt', library));
return FlxAtlasFrames.fromSpriteSheetPacker(image(key, library), file('images/$key.txt', library));
}
}
diff --git a/source/PlayState.hx b/source/PlayState.hx
index 969568b..544da27 100644
--- a/source/PlayState.hx
+++ b/source/PlayState.hx
@@ -171,6 +171,8 @@ class PlayState extends MusicBeatState
var notesHitArray:Array = [];
var currentFrames:Int = 0;
+ var idleToBeat:Bool = true; // change if bf and dad would idle to the beat of the song
+ var idleBeat:Int = 1; // how frequently bf and dad would play their idle animation(1 - every beat, 2 - every 2 beats and so on)
public var dialogue:Array = ['dad:blah blah blah', 'bf:coolswag'];
@@ -4173,8 +4175,9 @@ class PlayState extends MusicBeatState
// Conductor.changeBPM(SONG.bpm);
// Dad doesnt interupt his own notes
- if (SONG.notes[Math.floor(curStep / 16)].mustHitSection && dad.curCharacter != 'gf')
- dad.dance();
+ if ((SONG.notes[Math.floor(curStep / 16)].mustHitSection || !dad.animation.curAnim.name.startsWith("sing")) && dad.curCharacter != 'gf')
+ if (curBeat % idleBeat == 0)
+ dad.dance(idleToBeat);
}
// FlxG.log.add('change bpm' + SONG.notes[Std.int(curStep / 16)].changeBPM);
wiggleShit.update(Conductor.crochet);
@@ -4206,9 +4209,9 @@ class PlayState extends MusicBeatState
gf.dance();
}
- if (!boyfriend.animation.curAnim.name.startsWith("sing"))
+ if (!boyfriend.animation.curAnim.name.startsWith("sing") && curBeat % idleBeat == 0)
{
- boyfriend.playAnim('idle');
+ boyfriend.playAnim('idle', idleToBeat);
}
/*if (!dad.animation.curAnim.name.startsWith("sing"))
diff --git a/source/TitleState.hx b/source/TitleState.hx
index 13c4660..4df0552 100644
--- a/source/TitleState.hx
+++ b/source/TitleState.hx
@@ -275,6 +275,7 @@ class TitleState extends MusicBeatState
// FlxG.sound.music.stop();
MainMenuState.firstStart = true;
+ MainMenuState.finishedFunnyMove = false;
new FlxTimer().start(2, function(tmr:FlxTimer)
{