mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-14 19:25:16 -05:00
HAIR AND MOD SUPPORT SHIT IN PROGRESS
This commit is contained in:
parent
8ad3bf1f44
commit
d8159efb4b
10 changed files with 143 additions and 27 deletions
|
@ -2,7 +2,7 @@
|
|||
<project>
|
||||
<!-- _________________________ Application Settings _________________________ -->
|
||||
|
||||
<app title="Friday Night Funkin" file="Funkin" packageName="com.ninjamuffin99.funkin" main="Main" version="0.2.5" company="ninjamuffin99" />
|
||||
<app title="Friday Night Funkin'" file="Funkin" packageName="com.ninjamuffin99.funkin" main="Main" version="0.2.5" company="ninjamuffin99" />
|
||||
|
||||
<!--Switch Export with Unique ApplicationID and Icon-->
|
||||
<set name="APP_ID" value="0x0100f6c013bbc000" />
|
||||
|
@ -24,7 +24,7 @@
|
|||
<window if="html5" resizable="true" />
|
||||
|
||||
<!--Desktop-specific-->
|
||||
<window if="desktop" orientation="landscape" fullscreen="false" resizable="true" />
|
||||
<window if="desktop" orientation="landscape" fullscreen="false" resizable="true" vsync="false"/>
|
||||
|
||||
<!--Mobile-specific-->
|
||||
<window if="mobile" orientation="landscape" fullscreen="true" width="0" height="0" />
|
||||
|
|
|
@ -50,6 +50,7 @@ class AnimationDebug extends FlxState
|
|||
add(dad);
|
||||
|
||||
char = dad;
|
||||
dad.flipX = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -59,6 +60,7 @@ class AnimationDebug extends FlxState
|
|||
add(bf);
|
||||
|
||||
char = bf;
|
||||
bf.flipX = false;
|
||||
}
|
||||
|
||||
dumbTexts = new FlxTypedGroup<FlxText>();
|
||||
|
|
|
@ -18,21 +18,24 @@ class Boyfriend extends Character
|
|||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
if (animation.curAnim.name.startsWith('sing'))
|
||||
if (!debugMode)
|
||||
{
|
||||
holdTimer += elapsed;
|
||||
}
|
||||
else
|
||||
holdTimer = 0;
|
||||
if (animation.curAnim.name.startsWith('sing'))
|
||||
{
|
||||
holdTimer += elapsed;
|
||||
}
|
||||
else
|
||||
holdTimer = 0;
|
||||
|
||||
if (animation.curAnim.name.endsWith('miss') && animation.curAnim.finished && !debugMode)
|
||||
{
|
||||
playAnim('idle', true, false, 10);
|
||||
}
|
||||
if (animation.curAnim.name.endsWith('miss') && animation.curAnim.finished && !debugMode)
|
||||
{
|
||||
playAnim('idle', true, false, 10);
|
||||
}
|
||||
|
||||
if (animation.curAnim.name == 'firstDeath' && animation.curAnim.finished)
|
||||
{
|
||||
playAnim('deathLoop');
|
||||
if (animation.curAnim.name == 'firstDeath' && animation.curAnim.finished)
|
||||
{
|
||||
playAnim('deathLoop');
|
||||
}
|
||||
}
|
||||
|
||||
super.update(elapsed);
|
||||
|
|
|
@ -61,6 +61,19 @@ class Character extends FlxSprite
|
|||
|
||||
playAnim('danceRight');
|
||||
|
||||
case 'gf-car':
|
||||
tex = FlxAtlasFrames.fromSparrow('assets/images/gfCar.png', 'assets/images/gfCar.xml');
|
||||
frames = tex;
|
||||
animation.addByIndices('singUP', 'GF Dancing Beat Hair blowing CAR', [0], "", 24, false);
|
||||
animation.addByIndices('danceLeft', 'GF Dancing Beat Hair blowing CAR', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false);
|
||||
animation.addByIndices('danceRight', 'GF Dancing Beat Hair blowing CAR', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24,
|
||||
false);
|
||||
|
||||
addOffset('danceLeft', 0);
|
||||
addOffset('danceRight', 0);
|
||||
|
||||
playAnim('danceRight');
|
||||
|
||||
case 'dad':
|
||||
// DAD ANIMATION LOADING CODE
|
||||
tex = FlxAtlasFrames.fromSparrow('assets/images/DADDY_DEAREST.png', 'assets/images/DADDY_DEAREST.xml');
|
||||
|
@ -70,13 +83,14 @@ class Character extends FlxSprite
|
|||
animation.addByPrefix('singRIGHT', 'Dad Sing Note RIGHT', 24);
|
||||
animation.addByPrefix('singDOWN', 'Dad Sing Note DOWN', 24);
|
||||
animation.addByPrefix('singLEFT', 'Dad Sing Note LEFT', 24);
|
||||
playAnim('idle');
|
||||
|
||||
addOffset('idle');
|
||||
addOffset("singUP", -6, 50);
|
||||
addOffset("singRIGHT", 0, 27);
|
||||
addOffset("singLEFT", -10, 10);
|
||||
addOffset("singDOWN", 0, -30);
|
||||
|
||||
playAnim('idle');
|
||||
case 'spooky':
|
||||
tex = FlxAtlasFrames.fromSparrow('assets/images/spooky_kids_assets.png', 'assets/images/spooky_kids_assets.xml');
|
||||
frames = tex;
|
||||
|
@ -108,13 +122,33 @@ class Character extends FlxSprite
|
|||
// CUZ DAVE IS DUMB!
|
||||
animation.addByPrefix('singRIGHT', 'Mom Pose Left', 24, false);
|
||||
|
||||
addOffset('idle');
|
||||
addOffset("singUP", 14, 71);
|
||||
addOffset("singRIGHT", 10, -60);
|
||||
addOffset("singLEFT", 250, -23);
|
||||
addOffset("singDOWN", 20, -160);
|
||||
|
||||
playAnim('idle');
|
||||
|
||||
case 'mom-car':
|
||||
tex = FlxAtlasFrames.fromSparrow('assets/images/momCar.png', 'assets/images/momCar.xml');
|
||||
frames = tex;
|
||||
|
||||
animation.addByPrefix('idle', "Mom Idle", 24, false);
|
||||
animation.addByPrefix('singUP', "Mom Up Pose", 24, false);
|
||||
animation.addByPrefix('singDOWN', "MOM DOWN POSE", 24, false);
|
||||
animation.addByPrefix('singLEFT', 'Mom Left Pose', 24, false);
|
||||
// ANIMATION IS CALLED MOM LEFT POSE BUT ITS FOR THE RIGHT
|
||||
// CUZ DAVE IS DUMB!
|
||||
animation.addByPrefix('singRIGHT', 'Mom Pose Left', 24, false);
|
||||
|
||||
addOffset('idle');
|
||||
addOffset("singUP", 14, 71);
|
||||
addOffset("singRIGHT", 10, -60);
|
||||
addOffset("singLEFT", 250, -23);
|
||||
addOffset("singDOWN", 20, -160);
|
||||
|
||||
playAnim('idle');
|
||||
case 'monster':
|
||||
tex = FlxAtlasFrames.fromSparrow('assets/images/Monster_Assets.png', 'assets/images/Monster_Assets.xml');
|
||||
frames = tex;
|
||||
|
@ -131,7 +165,7 @@ class Character extends FlxSprite
|
|||
addOffset("singDOWN", -30, -40);
|
||||
playAnim('idle');
|
||||
case 'pico':
|
||||
tex = FlxAtlasFrames.fromSparrow('assets/images/.Pico_FNF_assetss.png', 'assets/images/Pico_FNF_assetss.xml');
|
||||
tex = FlxAtlasFrames.fromSparrow('assets/images/Pico_FNF_assetss.png', 'assets/images/Pico_FNF_assetss.xml');
|
||||
frames = tex;
|
||||
animation.addByPrefix('idle', "Pico Idle Dance", 24);
|
||||
animation.addByPrefix('singUP', 'pico Up note0', 24, false);
|
||||
|
@ -156,6 +190,7 @@ class Character extends FlxSprite
|
|||
animation.addByPrefix('singDOWNmiss', 'Pico Down Note MISS', 24);
|
||||
|
||||
playAnim('idle');
|
||||
|
||||
addOffset('idle');
|
||||
addOffset("singUP", -29, 27);
|
||||
addOffset("singRIGHT", -68, -7);
|
||||
|
@ -166,6 +201,8 @@ class Character extends FlxSprite
|
|||
addOffset("singLEFTmiss", 62, 64);
|
||||
addOffset("singDOWNmiss", 210, -28);
|
||||
|
||||
playAnim('idle');
|
||||
|
||||
flipX = true;
|
||||
|
||||
case 'bf':
|
||||
|
@ -205,6 +242,32 @@ class Character extends FlxSprite
|
|||
addOffset('deathConfirm', 37, 69);
|
||||
addOffset('scared', -4);
|
||||
|
||||
flipX = true;
|
||||
case 'bf-car':
|
||||
var tex = FlxAtlasFrames.fromSparrow('assets/images/bfCar.png', 'assets/images/bfCar.xml');
|
||||
frames = tex;
|
||||
animation.addByPrefix('idle', 'BF idle dance', 24, false);
|
||||
animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false);
|
||||
animation.addByPrefix('singLEFT', 'BF NOTE LEFT0', 24, false);
|
||||
animation.addByPrefix('singRIGHT', 'BF NOTE RIGHT0', 24, false);
|
||||
animation.addByPrefix('singDOWN', 'BF NOTE DOWN0', 24, false);
|
||||
animation.addByPrefix('singUPmiss', 'BF NOTE UP MISS', 24, false);
|
||||
animation.addByPrefix('singLEFTmiss', 'BF NOTE LEFT MISS', 24, false);
|
||||
animation.addByPrefix('singRIGHTmiss', 'BF NOTE RIGHT MISS', 24, false);
|
||||
animation.addByPrefix('singDOWNmiss', 'BF NOTE DOWN MISS', 24, false);
|
||||
|
||||
antialiasing = true;
|
||||
|
||||
addOffset('idle', -5);
|
||||
addOffset("singUP", -29, 27);
|
||||
addOffset("singRIGHT", -38, -7);
|
||||
addOffset("singLEFT", 12, -6);
|
||||
addOffset("singDOWN", -10, -50);
|
||||
addOffset("singUPmiss", -29, 27);
|
||||
addOffset("singRIGHTmiss", -30, 21);
|
||||
addOffset("singLEFTmiss", 12, 24);
|
||||
addOffset("singDOWNmiss", -11, -19);
|
||||
|
||||
flipX = true;
|
||||
}
|
||||
|
||||
|
@ -270,8 +333,12 @@ class Character extends FlxSprite
|
|||
{
|
||||
case 'mom':
|
||||
playAnim('idle');
|
||||
case 'mom-car':
|
||||
playAnim('idle');
|
||||
case 'bf':
|
||||
|
||||
playAnim('idle');
|
||||
case 'bf-car':
|
||||
playAnim('idle');
|
||||
case 'gf':
|
||||
if (!animation.curAnim.name.startsWith('hair'))
|
||||
{
|
||||
|
@ -283,6 +350,17 @@ class Character extends FlxSprite
|
|||
playAnim('danceLeft');
|
||||
}
|
||||
|
||||
case 'gf-car':
|
||||
if (!animation.curAnim.name.startsWith('hair'))
|
||||
{
|
||||
danced = !danced;
|
||||
|
||||
if (danced)
|
||||
playAnim('danceRight');
|
||||
else
|
||||
playAnim('danceLeft');
|
||||
}
|
||||
|
||||
case 'spooky':
|
||||
danced = !danced;
|
||||
|
||||
|
@ -303,10 +381,13 @@ class Character extends FlxSprite
|
|||
{
|
||||
animation.play(AnimName, Force, Reversed, Frame);
|
||||
|
||||
var daOffset = animOffsets.get(animation.curAnim.name);
|
||||
if (animOffsets.exists(animation.curAnim.name))
|
||||
if (animation.curAnim != null)
|
||||
{
|
||||
offset.set(daOffset[0], daOffset[1]);
|
||||
var daOffset = animOffsets.get(animation.curAnim.name);
|
||||
if (animOffsets.exists(animation.curAnim.name))
|
||||
{
|
||||
offset.set(daOffset[0], daOffset[1]);
|
||||
}
|
||||
}
|
||||
|
||||
if (curCharacter == 'gf')
|
||||
|
|
|
@ -208,7 +208,7 @@ class ChartingState extends MusicBeatState
|
|||
stepperBPM.value = Conductor.bpm;
|
||||
stepperBPM.name = 'song_bpm';
|
||||
|
||||
var characters:Array<String> = ["bf", 'dad', 'gf', 'spooky', 'monster', 'pico', 'mom'];
|
||||
var characters:Array<String> = ["bf", 'dad', 'gf', 'spooky', 'monster', 'pico', 'mom', 'mom-car', 'bf-car'];
|
||||
|
||||
for (i in Assets.getText('assets/images/custom_chars/charlist.txt').split('\n'))
|
||||
{
|
||||
|
|
20
source/CoolUtil.hx
Normal file
20
source/CoolUtil.hx
Normal file
|
@ -0,0 +1,20 @@
|
|||
package;
|
||||
|
||||
import lime.utils.Assets;
|
||||
|
||||
using StringTools;
|
||||
|
||||
class CoolUtil
|
||||
{
|
||||
public static function coolTextFile(path:String):Array<String>
|
||||
{
|
||||
var daList:Array<String> = Assets.getText(path).trim().split('\n');
|
||||
|
||||
for (i in 0...daList.length)
|
||||
{
|
||||
daList[i] = daList[i].trim();
|
||||
}
|
||||
|
||||
return daList;
|
||||
}
|
||||
}
|
|
@ -10,9 +10,11 @@ import flixel.text.FlxText;
|
|||
import flixel.util.FlxColor;
|
||||
import lime.utils.Assets;
|
||||
|
||||
using StringTools;
|
||||
|
||||
class FreeplayState extends MusicBeatState
|
||||
{
|
||||
var songs:Array<String> = ["Bopeebo", "Dadbattle", "Fresh", "Tutorial"];
|
||||
var songs:Array<String> = [];
|
||||
|
||||
var selector:FlxText;
|
||||
var curSelected:Int = 0;
|
||||
|
@ -28,6 +30,8 @@ class FreeplayState extends MusicBeatState
|
|||
|
||||
override function create()
|
||||
{
|
||||
songs = CoolUtil.coolTextFile('assets/data/freeplaySonglist.txt');
|
||||
|
||||
/*
|
||||
if (FlxG.sound.music != null)
|
||||
{
|
||||
|
|
|
@ -7,14 +7,15 @@ class HealthIcon extends FlxSprite
|
|||
public function new(char:String = 'bf', isPlayer:Bool = false)
|
||||
{
|
||||
super();
|
||||
|
||||
loadGraphic('assets/images/iconGrid.png', true, 150, 150);
|
||||
|
||||
antialiasing = true;
|
||||
animation.add('bf', [0, 1], 0, false, isPlayer);
|
||||
animation.add('bf-car', [0, 1], 0, false, isPlayer);
|
||||
animation.add('spooky', [2, 3], 0, false, isPlayer);
|
||||
animation.add('pico', [4, 5], 0, false, isPlayer);
|
||||
animation.add('mom', [6, 7], 0, false, isPlayer);
|
||||
animation.add('mom-car', [6, 7], 0, false, isPlayer);
|
||||
animation.add('tankman', [8, 9], 0, false, isPlayer);
|
||||
animation.add('face', [10, 11], 0, false, isPlayer);
|
||||
animation.add('dad', [12, 13], 0, false, isPlayer);
|
||||
|
|
|
@ -276,7 +276,12 @@ class PlayState extends MusicBeatState
|
|||
add(stageCurtains);
|
||||
}
|
||||
|
||||
gf = new Character(400, 130, 'gf');
|
||||
var gfVersion:String = 'gf';
|
||||
|
||||
if (curStage == 'limo')
|
||||
gfVersion = 'gf-car';
|
||||
|
||||
gf = new Character(400, 130, gfVersion);
|
||||
gf.scrollFactor.set(0.95, 0.95);
|
||||
gf.antialiasing = true;
|
||||
add(gf);
|
||||
|
@ -798,9 +803,9 @@ class PlayState extends MusicBeatState
|
|||
iconP1.animation.curAnim.curFrame = 0;
|
||||
|
||||
if (healthBar.percent > 80)
|
||||
iconP2.animation.curAnim.curFrame = Std.parseInt(curStage) + 1;
|
||||
iconP2.animation.curAnim.curFrame = 1;
|
||||
else
|
||||
iconP2.animation.curAnim.curFrame = Std.parseInt(curStage);
|
||||
iconP2.animation.curAnim.curFrame = 0;
|
||||
|
||||
/* if (FlxG.keys.justPressed.NINE)
|
||||
FlxG.switchState(new Charting()); */
|
||||
|
|
|
@ -40,7 +40,7 @@ class TitleState extends MusicBeatState
|
|||
|
||||
override public function create():Void
|
||||
{
|
||||
Polymod.init({modRoot: "assets/mods", dirs: ['introMod']});
|
||||
Polymod.init({modRoot: "assets/mods", dirs: CoolUtil.coolTextFile('assets/mods/modList.txt')});
|
||||
|
||||
#if (!web)
|
||||
TitleState.soundExt = '.ogg';
|
||||
|
|
Loading…
Reference in a new issue