mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-11-29 15:56:06 +00:00
Add hmm flxanimate, new conditional for Cheems' PC sake and more wip char select animation
This commit is contained in:
parent
a901677853
commit
f3722e5da2
2
assets
2
assets
|
|
@ -1 +1 @@
|
||||||
Subproject commit f73c8f4798bfcd23c98db03bcde2e0afcbce4cfd
|
Subproject commit d2ea072f32d0ba74cf8c62576f28e7b03d591ddb
|
||||||
2
hmm.json
2
hmm.json
|
|
@ -46,7 +46,7 @@
|
||||||
"name": "flxanimate",
|
"name": "flxanimate",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"dir": null,
|
"dir": null,
|
||||||
"ref": "27a0a1f0afc1074f619991472fb3ee209aad28df",
|
"ref": "280d1a46ac60021d08bb18181631cbd6d061782c",
|
||||||
"url": "https://github.com/Dot-Stuff/flxanimate"
|
"url": "https://github.com/Dot-Stuff/flxanimate"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ class Main extends Sprite
|
||||||
var gameHeight:Int = 720; // Height of the game in pixels (might be less / more in actual pixels depending on your zoom).
|
var gameHeight:Int = 720; // Height of the game in pixels (might be less / more in actual pixels depending on your zoom).
|
||||||
var initialState:Class<FlxState> = funkin.InitState; // The FlxState the game starts with.
|
var initialState:Class<FlxState> = funkin.InitState; // The FlxState the game starts with.
|
||||||
var zoom:Float = -1; // If -1, zoom is automatically calculated to fit the window dimensions.
|
var zoom:Float = -1; // If -1, zoom is automatically calculated to fit the window dimensions.
|
||||||
#if web
|
#if (web || CHEEMS)
|
||||||
var framerate:Int = 60; // How many frames per second the game should run at.
|
var framerate:Int = 60; // How many frames per second the game should run at.
|
||||||
#else
|
#else
|
||||||
// TODO: This should probably be in the options menu?
|
// TODO: This should probably be in the options menu?
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,7 @@ class CharSelectSubState extends MusicBeatSubState
|
||||||
|
|
||||||
var selectTimer:FlxTimer = new FlxTimer();
|
var selectTimer:FlxTimer = new FlxTimer();
|
||||||
var selectSound:FunkinSound;
|
var selectSound:FunkinSound;
|
||||||
|
var unlockSound:FunkinSound;
|
||||||
|
|
||||||
var charSelectCam:FunkinCamera;
|
var charSelectCam:FunkinCamera;
|
||||||
|
|
||||||
|
|
@ -270,6 +271,20 @@ class CharSelectSubState extends MusicBeatSubState
|
||||||
grpCursors.add(cursorBlue);
|
grpCursors.add(cursorBlue);
|
||||||
grpCursors.add(cursor);
|
grpCursors.add(cursor);
|
||||||
|
|
||||||
|
selectSound = new FunkinSound();
|
||||||
|
selectSound.loadEmbedded(Paths.sound('CS_select'));
|
||||||
|
selectSound.pitch = 1;
|
||||||
|
selectSound.volume = 0.7;
|
||||||
|
|
||||||
|
FlxG.sound.defaultSoundGroup.add(selectSound);
|
||||||
|
|
||||||
|
unlockSound = new FunkinSound();
|
||||||
|
unlockSound.loadEmbedded(Paths.sound('CS_unlock'));
|
||||||
|
unlockSound.pitch = 1;
|
||||||
|
unlockSound.volume = 0.7;
|
||||||
|
|
||||||
|
FlxG.sound.defaultSoundGroup.add(unlockSound);
|
||||||
|
|
||||||
initLocks();
|
initLocks();
|
||||||
|
|
||||||
for (index => member in grpIcons.members)
|
for (index => member in grpIcons.members)
|
||||||
|
|
@ -301,13 +316,6 @@ class CharSelectSubState extends MusicBeatSubState
|
||||||
add(temp);
|
add(temp);
|
||||||
temp.alpha = 0.0;
|
temp.alpha = 0.0;
|
||||||
|
|
||||||
selectSound = new FunkinSound();
|
|
||||||
selectSound.loadEmbedded(Paths.sound('CS_select'));
|
|
||||||
selectSound.pitch = 1;
|
|
||||||
selectSound.volume = 0.7;
|
|
||||||
|
|
||||||
FlxG.sound.defaultSoundGroup.add(selectSound);
|
|
||||||
|
|
||||||
Conductor.stepHit.add(spamOnStep);
|
Conductor.stepHit.add(spamOnStep);
|
||||||
// FlxG.debugger.track(temp, "tempBG");
|
// FlxG.debugger.track(temp, "tempBG");
|
||||||
|
|
||||||
|
|
@ -394,37 +402,40 @@ class CharSelectSubState extends MusicBeatSubState
|
||||||
|
|
||||||
var copy = 3;
|
var copy = 3;
|
||||||
|
|
||||||
var yThing = 0;
|
var yThing = -1;
|
||||||
|
|
||||||
while (index > copy)
|
while ((index + 1) > copy)
|
||||||
{
|
{
|
||||||
yThing++;
|
yThing++;
|
||||||
copy += 3;
|
copy += 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
var xThing = copy - index - 1;
|
var xThing = (copy - index - 2) * -1;
|
||||||
|
// Look, I'd write better code but I had better aneurysms, my bad - Cheems
|
||||||
|
cursorY = yThing;
|
||||||
|
cursorX = xThing;
|
||||||
|
|
||||||
cursorY = 3 - yThing;
|
selectSound.play(true);
|
||||||
cursorX = 3 - xThing;
|
|
||||||
|
nonLocks.shift();
|
||||||
|
|
||||||
selectTimer.start(1, function(_) {
|
selectTimer.start(1, function(_) {
|
||||||
var lock:Lock = cast grpIcons.group.members[index];
|
var lock:Lock = cast grpIcons.group.members[index];
|
||||||
|
|
||||||
|
lock.anim.getFrameLabel("unlockAnim").add(function() {
|
||||||
|
playerChillOut.playAnimation("death");
|
||||||
|
});
|
||||||
|
|
||||||
lock.playAnimation("unlock");
|
lock.playAnimation("unlock");
|
||||||
|
|
||||||
playerChill.visible = false;
|
unlockSound.play(true);
|
||||||
playerChill.switchChar(availableChars[index]);
|
|
||||||
|
|
||||||
playerChillOut.visible = true;
|
lock.onAnimationComplete.addOnce(function(_) {
|
||||||
playerChillOut.playAnimation("death");
|
camera.flash(0xFFFFFFFF, 0.1);
|
||||||
playerChillOut.onAnimationComplete.addOnce((_) -> if (_ == "death")
|
|
||||||
{
|
|
||||||
playerChill.playAnimation("unlock");
|
playerChill.playAnimation("unlock");
|
||||||
playerChill.onAnimationComplete.addOnce(function(_) {
|
playerChill.visible = true;
|
||||||
nonLocks.shift();
|
|
||||||
|
|
||||||
if (nonLocks.length > 0) unLock();
|
if (nonLocks.length == 0)
|
||||||
else
|
|
||||||
{
|
{
|
||||||
FunkinSound.playMusic('stayFunky',
|
FunkinSound.playMusic('stayFunky',
|
||||||
{
|
{
|
||||||
|
|
@ -443,9 +454,14 @@ class CharSelectSubState extends MusicBeatSubState
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
playerChill.onAnimationComplete.addOnce((_) -> unLock());
|
||||||
});
|
});
|
||||||
playerChill.visible = true;
|
|
||||||
});
|
playerChill.visible = false;
|
||||||
|
playerChill.switchChar(availableChars[index]);
|
||||||
|
|
||||||
|
playerChillOut.visible = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ class Lock extends FlxAtlasSprite
|
||||||
|
|
||||||
var arr:Array<String> = ["lock", "lock top 1", "lock top 2", "lock top 3", "lock base fuck it"];
|
var arr:Array<String> = ["lock", "lock top 1", "lock top 2", "lock top 3", "lock base fuck it"];
|
||||||
|
|
||||||
onAnimationComplete.add((_) -> if (_ == "unlock") playAnimation("idle"));
|
|
||||||
var func = function(name) {
|
var func = function(name) {
|
||||||
var symbol = anim.symbolDictionary[name];
|
var symbol = anim.symbolDictionary[name];
|
||||||
if (symbol != null && symbol.timeline.get("color") != null) symbol.timeline.get("color").get(0).colorEffect = tint;
|
if (symbol != null && symbol.timeline.get("color") != null) symbol.timeline.get("color").get(0).colorEffect = tint;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue