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 video:Video;
|
||||||
var netStream:NetStream;
|
var netStream:NetStream;
|
||||||
private var overlay:Sprite;
|
private var overlay:Sprite;
|
||||||
|
var songEventStuff:Map<Int, Array<SongEventInfo>>;
|
||||||
|
|
||||||
override public function create():Void
|
override public function create():Void
|
||||||
{
|
{
|
||||||
|
@ -55,8 +56,7 @@ class TitleState extends MusicBeatState
|
||||||
FlxG.sound.cache(Paths.music('freakyMenu'));
|
FlxG.sound.cache(Paths.music('freakyMenu'));
|
||||||
|
|
||||||
var jsonThing:String = Paths.file('data/songs/bopeebo/bopeebo-events.json');
|
var jsonThing:String = Paths.file('data/songs/bopeebo/bopeebo-events.json');
|
||||||
var songstuffLol = NoteUtil.loadSongEvents(jsonThing);
|
songEventStuff = NoteUtil.loadSongEvents(jsonThing);
|
||||||
trace(songstuffLol);
|
|
||||||
|
|
||||||
// DEBUG BULLSHIT
|
// DEBUG BULLSHIT
|
||||||
|
|
||||||
|
@ -270,6 +270,8 @@ class TitleState extends MusicBeatState
|
||||||
|
|
||||||
override function update(elapsed:Float)
|
override function update(elapsed:Float)
|
||||||
{
|
{
|
||||||
|
NoteUtil.checkSongEvents(songEventStuff, Conductor.songPosition);
|
||||||
|
|
||||||
#if HAS_PITCH
|
#if HAS_PITCH
|
||||||
if (FlxG.keys.pressed.UP)
|
if (FlxG.keys.pressed.UP)
|
||||||
FlxG.sound.music.pitch += 0.5 * elapsed;
|
FlxG.sound.music.pitch += 0.5 * elapsed;
|
||||||
|
|
|
@ -59,7 +59,20 @@ class NoteUtil
|
||||||
{
|
{
|
||||||
for (eventGrp in songData.keys())
|
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