easy charts
This commit is contained in:
parent
9ea6981f22
commit
83c46cadb0
|
@ -94,5 +94,5 @@
|
||||||
|
|
||||||
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
|
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
|
||||||
<icon path="art/icon.png"/>
|
<icon path="art/icon.png"/>
|
||||||
<haxedef name="SKIP_TO_PLAYSTATE" if="debug" />
|
<!-- <haxedef name="SKIP_TO_PLAYSTATE" if="debug" /> -->
|
||||||
</project>
|
</project>
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 600 KiB |
|
@ -17,6 +17,10 @@ class Alphabet extends FlxSpriteGroup
|
||||||
public var delay:Float = 0.05;
|
public var delay:Float = 0.05;
|
||||||
public var paused:Bool = false;
|
public var paused:Bool = false;
|
||||||
|
|
||||||
|
// for menu shit
|
||||||
|
public var targetY:Float = 0;
|
||||||
|
public var isMenuItem:Bool = false;
|
||||||
|
|
||||||
public var text:String = "";
|
public var text:String = "";
|
||||||
|
|
||||||
var _finalText:String = "";
|
var _finalText:String = "";
|
||||||
|
@ -207,6 +211,14 @@ class Alphabet extends FlxSpriteGroup
|
||||||
|
|
||||||
override function update(elapsed:Float)
|
override function update(elapsed:Float)
|
||||||
{
|
{
|
||||||
|
if (isMenuItem)
|
||||||
|
{
|
||||||
|
var scaledY = FlxMath.remapToRange(targetY, 0, 1, 0, 1.3);
|
||||||
|
|
||||||
|
y = FlxMath.lerp(y, (scaledY * 120) + (FlxG.height * 0.48), 0.16);
|
||||||
|
x = FlxMath.lerp(x, (targetY * 20) + 90, 0.16);
|
||||||
|
}
|
||||||
|
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package;
|
||||||
import flixel.FlxG;
|
import flixel.FlxG;
|
||||||
import flixel.FlxSprite;
|
import flixel.FlxSprite;
|
||||||
import flixel.addons.display.FlxGridOverlay;
|
import flixel.addons.display.FlxGridOverlay;
|
||||||
|
import flixel.group.FlxGroup.FlxTypedGroup;
|
||||||
import flixel.text.FlxText;
|
import flixel.text.FlxText;
|
||||||
|
|
||||||
class FreeplayState extends MusicBeatState
|
class FreeplayState extends MusicBeatState
|
||||||
|
@ -12,31 +13,40 @@ class FreeplayState extends MusicBeatState
|
||||||
var selector:FlxText;
|
var selector:FlxText;
|
||||||
var curSelected:Int = 0;
|
var curSelected:Int = 0;
|
||||||
|
|
||||||
|
private var grpSongs:FlxTypedGroup<Alphabet>;
|
||||||
|
|
||||||
override function create()
|
override function create()
|
||||||
{
|
{
|
||||||
// LOAD MUSIC
|
// LOAD MUSIC
|
||||||
|
|
||||||
// LOAD CHARACTERS
|
// LOAD CHARACTERS
|
||||||
|
|
||||||
var bg:FlxSprite = FlxGridOverlay.create(20, 20);
|
var bg:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.menuBGBlue__png);
|
||||||
add(bg);
|
add(bg);
|
||||||
|
|
||||||
|
grpSongs = new FlxTypedGroup<Alphabet>();
|
||||||
|
add(grpSongs);
|
||||||
|
|
||||||
for (i in 0...songs.length)
|
for (i in 0...songs.length)
|
||||||
{
|
{
|
||||||
var songText:Alphabet = new Alphabet(0, (70 * i) + 30, songs[i], true, false);
|
var songText:Alphabet = new Alphabet(0, (70 * i) + 30, songs[i], true, false);
|
||||||
add(songText);
|
songText.isMenuItem = true;
|
||||||
songText.x += 40;
|
songText.targetY = i;
|
||||||
|
grpSongs.add(songText);
|
||||||
|
// songText.x += 40;
|
||||||
// DONT PUT X IN THE FIRST PARAMETER OF new ALPHABET() !!
|
// DONT PUT X IN THE FIRST PARAMETER OF new ALPHABET() !!
|
||||||
// songText.screenCenter(X);
|
// songText.screenCenter(X);
|
||||||
}
|
}
|
||||||
|
|
||||||
FlxG.sound.playMusic('assets/music/title' + TitleState.soundExt, 0);
|
changeSelection();
|
||||||
FlxG.sound.music.fadeIn(2, 0, 0.8);
|
|
||||||
|
// FlxG.sound.playMusic('assets/music/title' + TitleState.soundExt, 0);
|
||||||
|
// FlxG.sound.music.fadeIn(2, 0, 0.8);
|
||||||
selector = new FlxText();
|
selector = new FlxText();
|
||||||
|
|
||||||
selector.size = 40;
|
selector.size = 40;
|
||||||
selector.text = ">";
|
selector.text = ">";
|
||||||
add(selector);
|
// add(selector);
|
||||||
|
|
||||||
var swag:Alphabet = new Alphabet(1, 0, "swag");
|
var swag:Alphabet = new Alphabet(1, 0, "swag");
|
||||||
|
|
||||||
|
@ -52,26 +62,48 @@ class FreeplayState extends MusicBeatState
|
||||||
|
|
||||||
if (upP)
|
if (upP)
|
||||||
{
|
{
|
||||||
curSelected -= 1;
|
changeSelection(-1);
|
||||||
}
|
}
|
||||||
if (downP)
|
if (downP)
|
||||||
{
|
{
|
||||||
curSelected += 1;
|
changeSelection(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (accepted)
|
||||||
|
{
|
||||||
|
PlayState.SONG = Song.loadFromJson(songs[curSelected].toLowerCase(), songs[curSelected].toLowerCase());
|
||||||
|
PlayState.isStoryMode = false;
|
||||||
|
FlxG.switchState(new PlayState());
|
||||||
|
FlxG.sound.music.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeSelection(change:Int = 0)
|
||||||
|
{
|
||||||
|
curSelected += change;
|
||||||
|
|
||||||
if (curSelected < 0)
|
if (curSelected < 0)
|
||||||
curSelected = songs.length - 1;
|
curSelected = songs.length - 1;
|
||||||
if (curSelected >= songs.length)
|
if (curSelected >= songs.length)
|
||||||
curSelected = 0;
|
curSelected = 0;
|
||||||
|
|
||||||
selector.y = (70 * curSelected) + 30;
|
// selector.y = (70 * curSelected) + 30;
|
||||||
|
|
||||||
if (accepted)
|
var bullShit:Int = 0;
|
||||||
|
|
||||||
|
for (item in grpSongs.members)
|
||||||
{
|
{
|
||||||
PlayState.SONG = Song.loadFromJson(songs[curSelected].toLowerCase());
|
item.targetY = bullShit - curSelected;
|
||||||
PlayState.isStoryMode = false;
|
bullShit++;
|
||||||
FlxG.switchState(new PlayState());
|
|
||||||
FlxG.sound.music.stop();
|
item.alpha = 0.6;
|
||||||
|
// item.setGraphicSize(Std.int(item.width * 0.8));
|
||||||
|
|
||||||
|
if (item.targetY == 0)
|
||||||
|
{
|
||||||
|
item.alpha = 1;
|
||||||
|
// item.setGraphicSize(Std.int(item.width));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1283,7 +1283,7 @@ class PlayState extends MusicBeatState
|
||||||
if (!boyfriend.animation.curAnim.name.startsWith("sing"))
|
if (!boyfriend.animation.curAnim.name.startsWith("sing"))
|
||||||
boyfriend.playAnim('idle');
|
boyfriend.playAnim('idle');
|
||||||
|
|
||||||
if (totalBeats % 8 == 6)
|
if (totalBeats % 8 == 7 && curSong == 'Bopeebo')
|
||||||
{
|
{
|
||||||
boyfriend.playAnim('hey', true);
|
boyfriend.playAnim('hey', true);
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,10 @@ class StoryMenuState extends MusicBeatState
|
||||||
{
|
{
|
||||||
var scoreText:FlxText;
|
var scoreText:FlxText;
|
||||||
|
|
||||||
var weekData:Array<Dynamic> = [['Tutorial', 'Bopeebo', 'Fresh', 'Dadbattle'], ['Spookeez', 'South', 'Monster']];
|
var weekData:Array<Dynamic> = [['Tutorial', 'Bopeebo', 'Fresh', 'Dadbattle'], ['Spookeez', 'South']];
|
||||||
var curDifficulty:Int = 1;
|
var curDifficulty:Int = 1;
|
||||||
|
|
||||||
public static var weekUnlocked:Array<Bool> = [true, false];
|
public static var weekUnlocked:Array<Bool> = [true, true];
|
||||||
|
|
||||||
var weekCharacters:Array<Dynamic> = [['dad', 'bf', 'gf'], ['spooky', 'bf', 'gf']];
|
var weekCharacters:Array<Dynamic> = [['dad', 'bf', 'gf'], ['spooky', 'bf', 'gf']];
|
||||||
var curWeek:Int = 0;
|
var curWeek:Int = 0;
|
||||||
|
@ -243,7 +243,8 @@ class StoryMenuState extends MusicBeatState
|
||||||
PlayState.SONG = Song.loadFromJson(PlayState.storyPlaylist[0].toLowerCase() + diffic, PlayState.storyPlaylist[0].toLowerCase());
|
PlayState.SONG = Song.loadFromJson(PlayState.storyPlaylist[0].toLowerCase() + diffic, PlayState.storyPlaylist[0].toLowerCase());
|
||||||
new FlxTimer().start(1, function(tmr:FlxTimer)
|
new FlxTimer().start(1, function(tmr:FlxTimer)
|
||||||
{
|
{
|
||||||
FlxG.sound.music.stop();
|
if (FlxG.sound.music != null)
|
||||||
|
FlxG.sound.music.stop();
|
||||||
FlxG.switchState(new PlayState());
|
FlxG.switchState(new PlayState());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue