mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-29 00:08:11 +00:00
Pyro test
This commit is contained in:
parent
c995870bac
commit
f2b4dbe751
|
@ -725,6 +725,8 @@ class Character extends FlxSprite
|
||||||
|
|
||||||
public function playAnim(AnimName:String, Force:Bool = false, Reversed:Bool = false, Frame:Int = 0):Void
|
public function playAnim(AnimName:String, Force:Bool = false, Reversed:Bool = false, Frame:Int = 0):Void
|
||||||
{
|
{
|
||||||
|
if (animation == null)
|
||||||
|
return;
|
||||||
animation.play(AnimName, Force, Reversed, Frame);
|
animation.play(AnimName, Force, Reversed, Frame);
|
||||||
|
|
||||||
var daOffset = animOffsets.get(AnimName);
|
var daOffset = animOffsets.get(AnimName);
|
||||||
|
|
|
@ -78,6 +78,7 @@ class FreeplayState extends MusicBeatSubstate
|
||||||
#if debug
|
#if debug
|
||||||
isDebug = true;
|
isDebug = true;
|
||||||
addSong('Test', 1, 'bf-pixel');
|
addSong('Test', 1, 'bf-pixel');
|
||||||
|
addSong('Pyro', 4, 'bf');
|
||||||
#end
|
#end
|
||||||
|
|
||||||
var initSonglist = CoolUtil.coolTextFile(Paths.txt('freeplaySonglist'));
|
var initSonglist = CoolUtil.coolTextFile(Paths.txt('freeplaySonglist'));
|
||||||
|
@ -517,10 +518,8 @@ class FreeplayState extends MusicBeatSubstate
|
||||||
if (controls.BACK)
|
if (controls.BACK)
|
||||||
{
|
{
|
||||||
FlxG.sound.play(Paths.sound('cancelMenu'));
|
FlxG.sound.play(Paths.sound('cancelMenu'));
|
||||||
|
// close();
|
||||||
close();
|
FlxG.switchState(new MainMenuState());
|
||||||
|
|
||||||
// FlxG.switchState(new MainMenuState());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (accepted)
|
if (accepted)
|
||||||
|
|
|
@ -117,6 +117,7 @@ class Note extends FlxSprite
|
||||||
|
|
||||||
var daStage:String = PlayState.curStageId;
|
var daStage:String = PlayState.curStageId;
|
||||||
|
|
||||||
|
// TODO: Make this logic more generic
|
||||||
switch (daStage)
|
switch (daStage)
|
||||||
{
|
{
|
||||||
case 'school' | 'schoolEvil':
|
case 'school' | 'schoolEvil':
|
||||||
|
@ -288,18 +289,20 @@ typedef RawNoteData =
|
||||||
var noteData:NoteType;
|
var noteData:NoteType;
|
||||||
var sustainLength:Float;
|
var sustainLength:Float;
|
||||||
var altNote:Bool;
|
var altNote:Bool;
|
||||||
|
var noteKind:NoteKind;
|
||||||
}
|
}
|
||||||
|
|
||||||
@:forward
|
@:forward
|
||||||
abstract NoteData(RawNoteData)
|
abstract NoteData(RawNoteData)
|
||||||
{
|
{
|
||||||
public function new(strumTime = 0.0, noteData:NoteType = 0, sustainLength = 0.0, altNote = false)
|
public function new(strumTime = 0.0, noteData:NoteType = 0, sustainLength = 0.0, altNote = false, noteKind = NORMAL)
|
||||||
{
|
{
|
||||||
this = {
|
this = {
|
||||||
strumTime: strumTime,
|
strumTime: strumTime,
|
||||||
noteData: noteData,
|
noteData: noteData,
|
||||||
sustainLength: sustainLength,
|
sustainLength: sustainLength,
|
||||||
altNote: altNote
|
altNote: altNote,
|
||||||
|
noteKind: noteKind
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -456,3 +459,13 @@ enum abstract NoteColor(NoteType) from Int to Int from NoteType
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum abstract NoteKind(String) from String to String
|
||||||
|
{
|
||||||
|
var NORMAL = "normal";
|
||||||
|
var PYRO_LIGHT = "pyro_light";
|
||||||
|
var PYRO_KICK = "pyro_kick";
|
||||||
|
var PYRO_TOSS = "pyro_toss";
|
||||||
|
var PYRO_COCK = "pyro_cock"; // lol
|
||||||
|
var PYRO_SHOOT = "pyro_shoot";
|
||||||
|
}
|
||||||
|
|
|
@ -84,7 +84,9 @@ class PlayState extends MusicBeatState
|
||||||
private var curSong:String = "";
|
private var curSong:String = "";
|
||||||
|
|
||||||
private var gfSpeed:Int = 1;
|
private var gfSpeed:Int = 1;
|
||||||
private var health:Float = 1;
|
|
||||||
|
public static var health:Float = 1;
|
||||||
|
|
||||||
private var healthDisplay:Float = 1;
|
private var healthDisplay:Float = 1;
|
||||||
private var combo:Int = 0;
|
private var combo:Int = 0;
|
||||||
|
|
||||||
|
@ -156,6 +158,9 @@ class PlayState extends MusicBeatState
|
||||||
{
|
{
|
||||||
initCameras();
|
initCameras();
|
||||||
|
|
||||||
|
// Starting health.
|
||||||
|
health = 1;
|
||||||
|
|
||||||
persistentUpdate = true;
|
persistentUpdate = true;
|
||||||
persistentDraw = true;
|
persistentDraw = true;
|
||||||
|
|
||||||
|
@ -171,11 +176,11 @@ class PlayState extends MusicBeatState
|
||||||
switch (SONG.song.toLowerCase())
|
switch (SONG.song.toLowerCase())
|
||||||
{
|
{
|
||||||
case 'senpai':
|
case 'senpai':
|
||||||
dialogue = CoolUtil.coolTextFile(Paths.txt('senpai/senpaiDialogue'));
|
dialogue = CoolUtil.coolTextFile(Paths.txt('songs/senpai/senpaiDialogue'));
|
||||||
case 'roses':
|
case 'roses':
|
||||||
dialogue = CoolUtil.coolTextFile(Paths.txt('roses/rosesDialogue'));
|
dialogue = CoolUtil.coolTextFile(Paths.txt('songs/roses/rosesDialogue'));
|
||||||
case 'thorns':
|
case 'thorns':
|
||||||
dialogue = CoolUtil.coolTextFile(Paths.txt('thorns/thornsDialogue'));
|
dialogue = CoolUtil.coolTextFile(Paths.txt('songs/thorns/thornsDialogue'));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if discord_rpc
|
#if discord_rpc
|
||||||
|
@ -400,6 +405,10 @@ class PlayState extends MusicBeatState
|
||||||
curStageId = 'mallEvil';
|
curStageId = 'mallEvil';
|
||||||
loadStage(curStageId);
|
loadStage(curStageId);
|
||||||
|
|
||||||
|
case 'pyro':
|
||||||
|
curStageId = 'pyro';
|
||||||
|
loadStage(curStageId);
|
||||||
|
|
||||||
case 'senpai' | 'roses':
|
case 'senpai' | 'roses':
|
||||||
curStageId = 'school';
|
curStageId = 'school';
|
||||||
|
|
||||||
|
@ -1347,12 +1356,19 @@ class PlayState extends MusicBeatState
|
||||||
if (swagCounter % gfSpeed == 0)
|
if (swagCounter % gfSpeed == 0)
|
||||||
gf.dance();
|
gf.dance();
|
||||||
if (swagCounter % 2 == 0)
|
if (swagCounter % 2 == 0)
|
||||||
|
{
|
||||||
|
if (boyfriend.animation != null)
|
||||||
{
|
{
|
||||||
if (!boyfriend.animation.curAnim.name.startsWith("sing"))
|
if (!boyfriend.animation.curAnim.name.startsWith("sing"))
|
||||||
boyfriend.playAnim('idle');
|
boyfriend.playAnim('idle');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dad.animation != null)
|
||||||
|
{
|
||||||
if (!dad.animation.curAnim.name.startsWith("sing"))
|
if (!dad.animation.curAnim.name.startsWith("sing"))
|
||||||
dad.dance();
|
dad.dance();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (dad.curCharacter == 'spooky' && !dad.animation.curAnim.name.startsWith("sing"))
|
else if (dad.curCharacter == 'spooky' && !dad.animation.curAnim.name.startsWith("sing"))
|
||||||
dad.dance();
|
dad.dance();
|
||||||
if (generatedMusic)
|
if (generatedMusic)
|
||||||
|
@ -1510,8 +1526,9 @@ class PlayState extends MusicBeatState
|
||||||
oldNote = null;
|
oldNote = null;
|
||||||
|
|
||||||
var swagNote:Note = new Note(daStrumTime, daNoteData, oldNote);
|
var swagNote:Note = new Note(daStrumTime, daNoteData, oldNote);
|
||||||
swagNote.data.sustainLength = songNotes.sustainLength;
|
swagNote.data = songNotes;
|
||||||
swagNote.data.altNote = songNotes.altNote;
|
// swagNote.data.sustainLength = songNotes.sustainLength;
|
||||||
|
// swagNote.data.altNote = songNotes.altNote;
|
||||||
swagNote.scrollFactor.set(0, 0);
|
swagNote.scrollFactor.set(0, 0);
|
||||||
|
|
||||||
var susLength:Float = swagNote.data.sustainLength;
|
var susLength:Float = swagNote.data.sustainLength;
|
||||||
|
@ -2127,8 +2144,13 @@ class PlayState extends MusicBeatState
|
||||||
}
|
}
|
||||||
else if (daNote.tooLate || daNote.wasGoodHit)
|
else if (daNote.tooLate || daNote.wasGoodHit)
|
||||||
{
|
{
|
||||||
|
// TODO: Why the hell is the noteMiss logic in two different places?
|
||||||
if (daNote.tooLate)
|
if (daNote.tooLate)
|
||||||
{
|
{
|
||||||
|
if (curStage != null)
|
||||||
|
{
|
||||||
|
curStage.onNoteMiss(daNote);
|
||||||
|
}
|
||||||
health -= 0.0775;
|
health -= 0.0775;
|
||||||
vocals.volume = 0;
|
vocals.volume = 0;
|
||||||
killCombo();
|
killCombo();
|
||||||
|
@ -2341,6 +2363,12 @@ class PlayState extends MusicBeatState
|
||||||
|
|
||||||
health += healthMulti;
|
health += healthMulti;
|
||||||
|
|
||||||
|
// TODO: Redo note hit logic to make sure this always gets called
|
||||||
|
if (curStage != null)
|
||||||
|
{
|
||||||
|
curStage.onNoteHit(daNote);
|
||||||
|
}
|
||||||
|
|
||||||
if (isSick)
|
if (isSick)
|
||||||
{
|
{
|
||||||
var noteSplash:NoteSplash = grpNoteSplashes.recycle(NoteSplash);
|
var noteSplash:NoteSplash = grpNoteSplashes.recycle(NoteSplash);
|
||||||
|
|
|
@ -188,6 +188,10 @@ class SongLoad
|
||||||
noteStuff[sectionIndex].sectionNotes[noteIndex].noteData = arrayDipshit[1];
|
noteStuff[sectionIndex].sectionNotes[noteIndex].noteData = arrayDipshit[1];
|
||||||
noteStuff[sectionIndex].sectionNotes[noteIndex].sustainLength = arrayDipshit[2];
|
noteStuff[sectionIndex].sectionNotes[noteIndex].sustainLength = arrayDipshit[2];
|
||||||
noteStuff[sectionIndex].sectionNotes[noteIndex].altNote = arrayDipshit[3];
|
noteStuff[sectionIndex].sectionNotes[noteIndex].altNote = arrayDipshit[3];
|
||||||
|
if (arrayDipshit.length >= 5)
|
||||||
|
{
|
||||||
|
noteStuff[sectionIndex].sectionNotes[noteIndex].noteKind = arrayDipshit[4];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (noteDataArray != null)
|
else if (noteDataArray != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -188,6 +188,22 @@ class Stage extends FlxSpriteGroup implements IHook
|
||||||
// trace('Stage.onUpdate(${elapsed})');
|
// trace('Stage.onUpdate(${elapsed})');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A function that gets called when the player hits a note.
|
||||||
|
*/
|
||||||
|
public function onNoteHit(note:Note):Void
|
||||||
|
{
|
||||||
|
// Override me in your scripted stage to perform custom behavior!
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A function that gets called when the player hits a note.
|
||||||
|
*/
|
||||||
|
public function onNoteMiss(note:Note):Void
|
||||||
|
{
|
||||||
|
// Override me in your scripted stage to perform custom behavior!
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adjusts the position and other properties of the soon-to-be child of this sprite group.
|
* Adjusts the position and other properties of the soon-to-be child of this sprite group.
|
||||||
* Private helper to avoid duplicate code in `add()` and `insert()`.
|
* Private helper to avoid duplicate code in `add()` and `insert()`.
|
||||||
|
|
Loading…
Reference in a new issue