mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-14 19:25:16 -05:00
song event trace prototype
This commit is contained in:
parent
f47e67e073
commit
f70b581bf8
2 changed files with 18 additions and 3 deletions
|
@ -45,6 +45,7 @@ class TitleState extends MusicBeatState
|
|||
var video:Video;
|
||||
var netStream:NetStream;
|
||||
private var overlay:Sprite;
|
||||
var songEventStuff:Map<Int, Array<SongEventInfo>>;
|
||||
|
||||
override public function create():Void
|
||||
{
|
||||
|
@ -55,8 +56,7 @@ class TitleState extends MusicBeatState
|
|||
FlxG.sound.cache(Paths.music('freakyMenu'));
|
||||
|
||||
var jsonThing:String = Paths.file('data/songs/bopeebo/bopeebo-events.json');
|
||||
var songstuffLol = NoteUtil.loadSongEvents(jsonThing);
|
||||
trace(songstuffLol);
|
||||
songEventStuff = NoteUtil.loadSongEvents(jsonThing);
|
||||
|
||||
// DEBUG BULLSHIT
|
||||
|
||||
|
@ -270,6 +270,8 @@ class TitleState extends MusicBeatState
|
|||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
NoteUtil.checkSongEvents(songEventStuff, Conductor.songPosition);
|
||||
|
||||
#if HAS_PITCH
|
||||
if (FlxG.keys.pressed.UP)
|
||||
FlxG.sound.music.pitch += 0.5 * elapsed;
|
||||
|
|
|
@ -59,7 +59,20 @@ class NoteUtil
|
|||
{
|
||||
for (eventGrp in songData.keys())
|
||||
{
|
||||
trace(eventGrp);
|
||||
if (time >= eventGrp)
|
||||
{
|
||||
for (events in songData[eventGrp])
|
||||
{
|
||||
if (!events.activated)
|
||||
{
|
||||
// TURN TO NICER SWITCH STATEMENT CHECKER OF EVENT TYPES!!
|
||||
trace(events.value);
|
||||
trace(eventGrp);
|
||||
trace(Conductor.songPosition);
|
||||
events.activated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue