Merge branch 'master' of https://github.com/KadeDev/Kade-Engine
This commit is contained in:
commit
1f49941f54
@ -16,7 +16,7 @@ Full Example
|
||||
|
||||
```lua
|
||||
function start (song)
|
||||
print("Song: " .. song .. " @ " .. bpm .. " donwscroll: " .. downscroll)
|
||||
print("Song: " .. song .. " @ " .. bpm .. " downscroll: " .. downscroll)
|
||||
end
|
||||
|
||||
|
||||
|
BIN
assets/shared/sounds/CLAP.ogg
Normal file
BIN
assets/shared/sounds/CLAP.ogg
Normal file
Binary file not shown.
BIN
assets/shared/sounds/SNAP.ogg
Normal file
BIN
assets/shared/sounds/SNAP.ogg
Normal file
Binary file not shown.
@ -89,6 +89,7 @@ class ChartingState extends MusicBeatState
|
||||
var rightIcon:HealthIcon;
|
||||
|
||||
private var lastNote:Note;
|
||||
var claps:Array<Note> = [];
|
||||
|
||||
override function create()
|
||||
{
|
||||
@ -240,6 +241,11 @@ class ChartingState extends MusicBeatState
|
||||
});
|
||||
|
||||
var loadAutosaveBtn:FlxButton = new FlxButton(reloadSongJson.x, reloadSongJson.y + 30, 'load autosave', loadAutosave);
|
||||
var stepperBPM:FlxUINumericStepper = new FlxUINumericStepper(10, 65, 0.1, 1, 1.0, 5000.0, 1);
|
||||
stepperBPM.value = Conductor.bpm;
|
||||
stepperBPM.name = 'song_bpm';
|
||||
|
||||
var stepperBPMLabel = new FlxText(74,65,'BPM');
|
||||
|
||||
var stepperSpeed:FlxUINumericStepper = new FlxUINumericStepper(10, 80, 0.1, 1, 0.1, 10, 1);
|
||||
stepperSpeed.value = _song.speed;
|
||||
@ -247,11 +253,17 @@ class ChartingState extends MusicBeatState
|
||||
|
||||
var stepperSpeedLabel = new FlxText(74,80,'Scroll Speed');
|
||||
|
||||
var stepperBPM:FlxUINumericStepper = new FlxUINumericStepper(10, 65, 0.1, 1, 1.0, 5000.0, 1);
|
||||
stepperBPM.value = Conductor.bpm;
|
||||
stepperBPM.name = 'song_bpm';
|
||||
var stepperVocalVol:FlxUINumericStepper = new FlxUINumericStepper(10, 95, 0.1, 1, 0.1, 10, 1);
|
||||
stepperVocalVol.value = vocals.volume;
|
||||
stepperVocalVol.name = 'song_vocalvol';
|
||||
|
||||
var stepperBPMLabel = new FlxText(74,65,'BPM');
|
||||
var stepperVocalVolLabel = new FlxText(74, 95, 'Vocal Volume');
|
||||
|
||||
var stepperSongVol:FlxUINumericStepper = new FlxUINumericStepper(10, 110, 0.1, 1, 0.1, 10, 1);
|
||||
stepperSongVol.value = FlxG.sound.music.volume;
|
||||
stepperSongVol.name = 'song_instvol';
|
||||
|
||||
var stepperSongVolLabel = new FlxText(74, 110, 'Instrumental Volume');
|
||||
|
||||
var characters:Array<String> = CoolUtil.coolTextFile(Paths.txt('characterList'));
|
||||
var gfVersions:Array<String> = CoolUtil.coolTextFile(Paths.txt('gfVersionList'));
|
||||
@ -312,6 +324,10 @@ class ChartingState extends MusicBeatState
|
||||
tab_group_song.add(stepperBPMLabel);
|
||||
tab_group_song.add(stepperSpeed);
|
||||
tab_group_song.add(stepperSpeedLabel);
|
||||
tab_group_song.add(stepperVocalVol);
|
||||
tab_group_song.add(stepperVocalVolLabel);
|
||||
tab_group_song.add(stepperSongVol);
|
||||
tab_group_song.add(stepperSongVolLabel);
|
||||
|
||||
var tab_group_assets = new FlxUI(null, UI_box);
|
||||
tab_group_assets.name = "Assets";
|
||||
@ -545,6 +561,16 @@ class ChartingState extends MusicBeatState
|
||||
nums.value = 0.1;
|
||||
_song.notes[curSection].bpm = Std.int(nums.value);
|
||||
updateGrid();
|
||||
}else if (wname == 'song_vocalvol')
|
||||
{
|
||||
if (nums.value <= 0.1)
|
||||
nums.value = 0.1;
|
||||
vocals.volume = nums.value;
|
||||
}else if (wname == 'song_instvol')
|
||||
{
|
||||
if (nums.value <= 0.1)
|
||||
nums.value = 0.1;
|
||||
FlxG.sound.music.volume = nums.value;
|
||||
}
|
||||
}
|
||||
|
||||
@ -631,6 +657,21 @@ class ChartingState extends MusicBeatState
|
||||
|
||||
strumLine.y = getYfromStrum((Conductor.songPosition - sectionStartTime()) % (Conductor.stepCrochet * _song.notes[curSection].lengthInSteps));
|
||||
|
||||
curRenderedNotes.forEach(function(note:Note)
|
||||
{
|
||||
if (FlxG.sound.music.playing)
|
||||
{
|
||||
FlxG.overlap(strumLine, note, function(_, _)
|
||||
{
|
||||
if(!claps.contains(note))
|
||||
{
|
||||
claps.push(note);
|
||||
if(_song.notes[curSection].mustHitSection) FlxG.sound.play(Paths.sound('CLAP'));
|
||||
else FlxG.sound.play(Paths.sound('SNAP'));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/*curRenderedNotes.forEach(function(note:Note) {
|
||||
if (strumLine.overlaps(note) && strumLine.y == note.y) // yandere dev type shit
|
||||
@ -829,6 +870,7 @@ class ChartingState extends MusicBeatState
|
||||
{
|
||||
FlxG.sound.music.pause();
|
||||
vocals.pause();
|
||||
claps.splice(0, claps.length);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3269,12 +3269,13 @@ class PlayState extends MusicBeatState
|
||||
// Commented out until a reason to bring this back arises in the future
|
||||
/* if (SONG.notes[Math.floor(curStep / 16)].mustHitSection)
|
||||
dad.dance(); */
|
||||
|
||||
/* no because this is kinda dumb
|
||||
if(dad.animation.curAnim.name.startsWith('sing'))
|
||||
if(dad.animation.finished)
|
||||
dad.dance();
|
||||
else
|
||||
dad.dance();
|
||||
*/
|
||||
}
|
||||
// FlxG.log.add('change bpm' + SONG.notes[Std.int(curStep / 16)].changeBPM);
|
||||
wiggleShit.update(Conductor.crochet);
|
||||
@ -3308,6 +3309,11 @@ class PlayState extends MusicBeatState
|
||||
boyfriend.playAnim('idle');
|
||||
}
|
||||
|
||||
if (!dad.animation.curAnim.name.startsWith("sing"))
|
||||
{
|
||||
dad.dance();
|
||||
}
|
||||
|
||||
if (curBeat % 8 == 7 && curSong == 'Bopeebo')
|
||||
{
|
||||
boyfriend.playAnim('hey', true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user