mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-23 04:58:36 +00:00
swappable characters debug
This commit is contained in:
parent
17b6015b2c
commit
8ad3bf1f44
|
@ -8,7 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Added
|
||||
- Enemy icons change when they you are winning a lot ([Thanks to pahaze for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/138))
|
||||
- Holding CTRL in charting editor places notes on both sides
|
||||
- Q and E changes sustain lengths in note editor
|
||||
- Other charting editor workflow improvements
|
||||
### Removed
|
||||
- Removed APE
|
||||
### Fixed
|
||||
- Song no longer loops when finishing the song. ([Thanks Injourn for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/132))
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ class Boyfriend extends Character
|
|||
{
|
||||
public var stunned:Bool = false;
|
||||
|
||||
public function new(x:Float, y:Float)
|
||||
public function new(x:Float, y:Float, ?char:String = 'bf')
|
||||
{
|
||||
super(x, y);
|
||||
super(x, y, char, true);
|
||||
}
|
||||
|
||||
override function update(elapsed:Float)
|
||||
|
|
|
@ -166,8 +166,7 @@ class Character extends FlxSprite
|
|||
addOffset("singLEFTmiss", 62, 64);
|
||||
addOffset("singDOWNmiss", 210, -28);
|
||||
|
||||
if (!isPlayer)
|
||||
flipX = true;
|
||||
flipX = true;
|
||||
|
||||
case 'bf':
|
||||
var tex = FlxAtlasFrames.fromSparrow('assets/images/BOYFRIEND.png', 'assets/images/BOYFRIEND.xml');
|
||||
|
@ -188,7 +187,6 @@ class Character extends FlxSprite
|
|||
animation.addByPrefix('deathConfirm', "BF Dead confirm", 24, false);
|
||||
|
||||
animation.addByPrefix('scared', 'BF idle shaking', 24);
|
||||
playAnim('idle');
|
||||
|
||||
antialiasing = true;
|
||||
|
||||
|
@ -206,6 +204,28 @@ class Character extends FlxSprite
|
|||
addOffset('deathLoop', 37, 5);
|
||||
addOffset('deathConfirm', 37, 69);
|
||||
addOffset('scared', -4);
|
||||
|
||||
flipX = true;
|
||||
}
|
||||
|
||||
playAnim('singUP');
|
||||
|
||||
if (isPlayer)
|
||||
{
|
||||
flipX = !flipX;
|
||||
|
||||
// var animArray
|
||||
var oldRight = animation.getByName('singRIGHT').frames;
|
||||
animation.getByName('singRIGHT').frames = animation.getByName('singLEFT').frames;
|
||||
animation.getByName('singLEFT').frames = oldRight;
|
||||
|
||||
// IF THEY HAVE MISS ANIMATIONS??
|
||||
if (animation.getByName('singRIGHTmiss') != null)
|
||||
{
|
||||
var oldMiss = animation.getByName('singRIGHTmiss').frames;
|
||||
animation.getByName('singRIGHTmiss').frames = animation.getByName('singLEFTmiss').frames;
|
||||
animation.getByName('singLEFTmiss').frames = oldMiss;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,8 @@ class ChartingState extends MusicBeatState
|
|||
*/
|
||||
var curSection:Int = 0;
|
||||
|
||||
public static var lastSection:Int = 0;
|
||||
|
||||
var bpmTxt:FlxText;
|
||||
|
||||
var strumLine:FlxSprite;
|
||||
|
@ -79,6 +81,8 @@ class ChartingState extends MusicBeatState
|
|||
|
||||
override function create()
|
||||
{
|
||||
curSection = lastSection;
|
||||
|
||||
gridBG = FlxGridOverlay.create(GRID_SIZE, GRID_SIZE, GRID_SIZE * 8, GRID_SIZE * 16);
|
||||
add(gridBG);
|
||||
|
||||
|
@ -167,6 +171,18 @@ class ChartingState extends MusicBeatState
|
|||
trace('CHECKED!');
|
||||
};
|
||||
|
||||
var check_mute_inst = new FlxUICheckBox(10, 200, null, null, "Mute Instrumental (in editor)", 100);
|
||||
check_mute_inst.checked = false;
|
||||
check_mute_inst.callback = function()
|
||||
{
|
||||
var vol:Float = 1;
|
||||
|
||||
if (check_mute_inst.checked)
|
||||
vol = 0;
|
||||
|
||||
FlxG.sound.music.volume = vol;
|
||||
};
|
||||
|
||||
var saveButton:FlxButton = new FlxButton(110, 8, "Save", function()
|
||||
{
|
||||
saveLevel();
|
||||
|
@ -217,6 +233,7 @@ class ChartingState extends MusicBeatState
|
|||
tab_group_song.add(UI_songTitle);
|
||||
|
||||
tab_group_song.add(check_voices);
|
||||
tab_group_song.add(check_mute_inst);
|
||||
tab_group_song.add(saveButton);
|
||||
tab_group_song.add(reloadSong);
|
||||
tab_group_song.add(reloadSongJson);
|
||||
|
@ -489,12 +506,23 @@ class ChartingState extends MusicBeatState
|
|||
|
||||
if (FlxG.keys.justPressed.ENTER)
|
||||
{
|
||||
lastSection = curSection;
|
||||
|
||||
PlayState.SONG = _song;
|
||||
FlxG.sound.music.stop();
|
||||
vocals.stop();
|
||||
FlxG.switchState(new PlayState());
|
||||
}
|
||||
|
||||
if (FlxG.keys.justPressed.E)
|
||||
{
|
||||
changeNoteSustain(Conductor.stepCrochet);
|
||||
}
|
||||
if (FlxG.keys.justPressed.Q)
|
||||
{
|
||||
changeNoteSustain(-Conductor.stepCrochet);
|
||||
}
|
||||
|
||||
if (FlxG.keys.justPressed.TAB)
|
||||
{
|
||||
if (FlxG.keys.pressed.SHIFT)
|
||||
|
@ -607,6 +635,18 @@ class ChartingState extends MusicBeatState
|
|||
super.update(elapsed);
|
||||
}
|
||||
|
||||
function changeNoteSustain(value:Float):Void
|
||||
{
|
||||
if (curSelectedNote[2] != null)
|
||||
{
|
||||
curSelectedNote[2] += value;
|
||||
curSelectedNote[2] = Math.max(curSelectedNote[2], 0);
|
||||
}
|
||||
|
||||
updateNoteUI();
|
||||
updateGrid();
|
||||
}
|
||||
|
||||
function recalculateSteps():Int
|
||||
{
|
||||
var steps:Int = 0;
|
||||
|
@ -675,15 +715,7 @@ class ChartingState extends MusicBeatState
|
|||
daNum++;
|
||||
}
|
||||
|
||||
if (FlxG.keys.pressed.CONTROL)
|
||||
{
|
||||
FlxG.sound.music.time = (daLength - lengthBpmBullshit()) * Conductor.stepCrochet;
|
||||
}
|
||||
else
|
||||
{
|
||||
FlxG.sound.music.time += (lengthBpmBullshit() * Conductor.stepCrochet) * sec;
|
||||
}
|
||||
|
||||
FlxG.sound.music.time = (daLength - lengthBpmBullshit()) * Conductor.stepCrochet;
|
||||
vocals.time = FlxG.sound.music.time;
|
||||
updateCurStep();
|
||||
}
|
||||
|
|
|
@ -312,7 +312,7 @@ class PlayState extends MusicBeatState
|
|||
dad.y += 300;
|
||||
}
|
||||
|
||||
boyfriend = new Boyfriend(770, 450);
|
||||
boyfriend = new Boyfriend(770, 450, SONG.player1);
|
||||
add(boyfriend);
|
||||
|
||||
// REPOSITIONING PER STAGE
|
||||
|
@ -796,8 +796,8 @@ class PlayState extends MusicBeatState
|
|||
iconP1.animation.curAnim.curFrame = 1;
|
||||
else
|
||||
iconP1.animation.curAnim.curFrame = 0;
|
||||
|
||||
if (healthBar.percent > 80)
|
||||
|
||||
if (healthBar.percent > 80)
|
||||
iconP2.animation.curAnim.curFrame = Std.parseInt(curStage) + 1;
|
||||
else
|
||||
iconP2.animation.curAnim.curFrame = Std.parseInt(curStage);
|
||||
|
|
Loading…
Reference in a new issue