mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-07-06 11:06:26 +00:00
assets submod
This commit is contained in:
commit
130440fd6e
2
assets
2
assets
|
@ -1 +1 @@
|
||||||
Subproject commit 9050732ec1cc69cbca9a9a73ee817459f84bdc53
|
Subproject commit 8d5bc0dce1e0cb4f545037ce4040e7a5f2d85871
|
|
@ -11,7 +11,6 @@ class MenuItem extends FlxSpriteGroup
|
||||||
{
|
{
|
||||||
public var targetY:Float = 0;
|
public var targetY:Float = 0;
|
||||||
public var week:FlxSprite;
|
public var week:FlxSprite;
|
||||||
public var flashingInt:Int = 0;
|
|
||||||
|
|
||||||
public function new(x:Float, y:Float, weekNum:Int = 0, weekType:WeekType)
|
public function new(x:Float, y:Float, weekNum:Int = 0, weekType:WeekType)
|
||||||
{
|
{
|
||||||
|
@ -30,28 +29,28 @@ class MenuItem extends FlxSpriteGroup
|
||||||
}
|
}
|
||||||
|
|
||||||
var isFlashing:Bool = false;
|
var isFlashing:Bool = false;
|
||||||
|
var flashTick:Float = 0;
|
||||||
|
final flashFramerate:Float = 20;
|
||||||
|
|
||||||
public function startFlashing():Void
|
public function startFlashing():Void
|
||||||
{
|
{
|
||||||
isFlashing = true;
|
isFlashing = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if it runs at 60fps, fake framerate will be 6
|
|
||||||
// if it runs at 144 fps, fake framerate will be like 14, and will update the graphic every 0.016666 * 3 seconds still???
|
|
||||||
// so it runs basically every so many seconds, not dependant on framerate??
|
|
||||||
// I'm still learning how math works thanks whoever is reading this lol
|
|
||||||
var fakeFramerate:Int = Math.round((1 / FlxG.elapsed) / 10);
|
|
||||||
|
|
||||||
override function update(elapsed:Float)
|
override function update(elapsed:Float)
|
||||||
{
|
{
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
y = MathUtil.coolLerp(y, (targetY * 120) + 480, 0.17);
|
y = MathUtil.coolLerp(y, (targetY * 120) + 480, 0.17);
|
||||||
|
|
||||||
if (isFlashing) flashingInt += 1;
|
if (isFlashing)
|
||||||
|
{
|
||||||
if (flashingInt % fakeFramerate >= Math.floor(fakeFramerate / 2)) week.color = 0xFF33ffff;
|
flashTick += elapsed;
|
||||||
else
|
if (flashTick >= 1 / flashFramerate)
|
||||||
week.color = FlxColor.WHITE;
|
{
|
||||||
|
flashTick %= 1 / flashFramerate;
|
||||||
|
week.color = (week.color == FlxColor.WHITE) ? 0xFF33ffff : FlxColor.WHITE;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -214,7 +214,7 @@ class FreeplayState extends MusicBeatSubState
|
||||||
prepForNewRank = true;
|
prepForNewRank = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stickers != null)
|
if (stickers?.members != null)
|
||||||
{
|
{
|
||||||
stickerSubState = stickers;
|
stickerSubState = stickers;
|
||||||
}
|
}
|
||||||
|
@ -1738,7 +1738,7 @@ class FreeplayState extends MusicBeatSubState
|
||||||
dj.confirm();
|
dj.confirm();
|
||||||
|
|
||||||
grpCapsules.members[curSelected].forcePosition();
|
grpCapsules.members[curSelected].forcePosition();
|
||||||
grpCapsules.members[curSelected].songText.flickerText();
|
grpCapsules.members[curSelected].confirm();
|
||||||
|
|
||||||
// FlxTween.color(bgDad, 0.33, 0xFFFFFFFF, 0xFF555555, {ease: FlxEase.quadOut});
|
// FlxTween.color(bgDad, 0.33, 0xFFFFFFFF, 0xFF555555, {ease: FlxEase.quadOut});
|
||||||
FlxTween.color(pinkBack, 0.33, 0xFFFFD0D5, 0xFF171831, {ease: FlxEase.quadOut});
|
FlxTween.color(pinkBack, 0.33, 0xFFFFD0D5, 0xFF171831, {ease: FlxEase.quadOut});
|
||||||
|
@ -2039,6 +2039,8 @@ class FreeplaySongData
|
||||||
|
|
||||||
function set_currentDifficulty(value:String):String
|
function set_currentDifficulty(value:String):String
|
||||||
{
|
{
|
||||||
|
if (currentDifficulty == value) return value;
|
||||||
|
|
||||||
currentDifficulty = value;
|
currentDifficulty = value;
|
||||||
updateValues(displayedVariations);
|
updateValues(displayedVariations);
|
||||||
return value;
|
return value;
|
||||||
|
|
|
@ -543,8 +543,6 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
charPath += 'monsterpixel';
|
charPath += 'monsterpixel';
|
||||||
case 'mom-car':
|
case 'mom-car':
|
||||||
charPath += 'mommypixel';
|
charPath += 'mommypixel';
|
||||||
case 'dad':
|
|
||||||
charPath += 'daddypixel';
|
|
||||||
case 'darnell-blazin':
|
case 'darnell-blazin':
|
||||||
charPath += 'darnellpixel';
|
charPath += 'darnellpixel';
|
||||||
case 'senpai-angry':
|
case 'senpai-angry':
|
||||||
|
@ -559,7 +557,17 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pixelIcon.loadGraphic(Paths.image(charPath));
|
var isAnimated = openfl.utils.Assets.exists(Paths.file('images/$charPath.xml'));
|
||||||
|
|
||||||
|
if (isAnimated)
|
||||||
|
{
|
||||||
|
pixelIcon.frames = Paths.getSparrowAtlas(charPath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pixelIcon.loadGraphic(Paths.image(charPath));
|
||||||
|
}
|
||||||
|
|
||||||
pixelIcon.scale.x = pixelIcon.scale.y = 2;
|
pixelIcon.scale.x = pixelIcon.scale.y = 2;
|
||||||
|
|
||||||
switch (char)
|
switch (char)
|
||||||
|
@ -571,6 +579,22 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
}
|
}
|
||||||
// pixelIcon.origin.x = capsule.origin.x;
|
// pixelIcon.origin.x = capsule.origin.x;
|
||||||
// pixelIcon.offset.x -= pixelIcon.origin.x;
|
// pixelIcon.offset.x -= pixelIcon.origin.x;
|
||||||
|
|
||||||
|
if (isAnimated)
|
||||||
|
{
|
||||||
|
pixelIcon.active = true;
|
||||||
|
|
||||||
|
pixelIcon.animation.addByPrefix('idle', 'idle0', 10, true);
|
||||||
|
pixelIcon.animation.addByPrefix('confirm', 'confirm0', 10, false);
|
||||||
|
pixelIcon.animation.addByPrefix('confirm-hold', 'confirm-hold0', 10, true);
|
||||||
|
|
||||||
|
pixelIcon.animation.finishCallback = function(name:String):Void {
|
||||||
|
trace('Finish pixel animation: ${name}');
|
||||||
|
if (name == 'confirm') pixelIcon.animation.play('confirm-hold');
|
||||||
|
};
|
||||||
|
|
||||||
|
pixelIcon.animation.play('idle');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var frameInTicker:Float = 0;
|
var frameInTicker:Float = 0;
|
||||||
|
@ -711,6 +735,18 @@ class SongMenuItem extends FlxSpriteGroup
|
||||||
super.update(elapsed);
|
super.update(elapsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Play any animations associated with selecting this song.
|
||||||
|
*/
|
||||||
|
public function confirm():Void
|
||||||
|
{
|
||||||
|
if (songText != null) songText.flickerText();
|
||||||
|
if (pixelIcon != null)
|
||||||
|
{
|
||||||
|
pixelIcon.animation.play('confirm');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function intendedY(index:Int):Float
|
public function intendedY(index:Int):Float
|
||||||
{
|
{
|
||||||
return (index * ((height * realScaled) + 10)) + 120;
|
return (index * ((height * realScaled) + 10)) + 120;
|
||||||
|
|
|
@ -13,13 +13,10 @@ class LevelTitle extends FlxSpriteGroup
|
||||||
public final level:Level;
|
public final level:Level;
|
||||||
|
|
||||||
public var targetY:Float;
|
public var targetY:Float;
|
||||||
public var isFlashing:Bool = false;
|
|
||||||
|
|
||||||
var title:FlxSprite;
|
var title:FlxSprite;
|
||||||
var lock:FlxSprite;
|
var lock:FlxSprite;
|
||||||
|
|
||||||
var flashingInt:Int = 0;
|
|
||||||
|
|
||||||
public function new(x:Int, y:Int, level:Level)
|
public function new(x:Int, y:Int, level:Level)
|
||||||
{
|
{
|
||||||
super(x, y);
|
super(x, y);
|
||||||
|
@ -46,20 +43,23 @@ class LevelTitle extends FlxSpriteGroup
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if it runs at 60fps, fake framerate will be 6
|
public var isFlashing:Bool = false;
|
||||||
// if it runs at 144 fps, fake framerate will be like 14, and will update the graphic every 0.016666 * 3 seconds still???
|
var flashTick:Float = 0;
|
||||||
// so it runs basically every so many seconds, not dependant on framerate??
|
final flashFramerate:Float = 20;
|
||||||
// I'm still learning how math works thanks whoever is reading this lol
|
|
||||||
var fakeFramerate:Int = Math.round((1 / FlxG.elapsed) / 10);
|
|
||||||
|
|
||||||
public override function update(elapsed:Float):Void
|
public override function update(elapsed:Float):Void
|
||||||
{
|
{
|
||||||
this.y = MathUtil.coolLerp(y, targetY, 0.17);
|
this.y = MathUtil.coolLerp(y, targetY, 0.17);
|
||||||
|
|
||||||
if (isFlashing) flashingInt += 1;
|
if (isFlashing)
|
||||||
if (flashingInt % fakeFramerate >= Math.floor(fakeFramerate / 2)) title.color = 0xFF33ffff;
|
{
|
||||||
else
|
flashTick += elapsed;
|
||||||
title.color = FlxColor.WHITE;
|
if (flashTick >= 1 / flashFramerate)
|
||||||
|
{
|
||||||
|
flashTick %= 1 / flashFramerate;
|
||||||
|
title.color = (title.color == FlxColor.WHITE) ? 0xFF33ffff : FlxColor.WHITE;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function showLock():Void
|
public function showLock():Void
|
||||||
|
|
|
@ -113,7 +113,7 @@ class StoryMenuState extends MusicBeatState
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
|
||||||
if (stickers != null)
|
if (stickers?.members != null)
|
||||||
{
|
{
|
||||||
stickerSubState = stickers;
|
stickerSubState = stickers;
|
||||||
}
|
}
|
||||||
|
|
|
@ -346,7 +346,7 @@ class LoadingState extends MusicBeatSubState
|
||||||
return 'Done precaching ${path}';
|
return 'Done precaching ${path}';
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
trace("Queued ${path} for precaching");
|
trace('Queued ${path} for precaching');
|
||||||
// FunkinSprite.cacheTexture(path);
|
// FunkinSprite.cacheTexture(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue