1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-11-15 11:22:55 +00:00

Add lock bizz

This commit is contained in:
CheemsAndFriends 2024-09-04 20:08:38 +02:00 committed by EliteMasterEric
parent 0e37cb9540
commit 4cad56705a
20 changed files with 64 additions and 19 deletions

2
assets

@ -1 +1 @@
Subproject commit f1c74ef595a29d11544492e0dc907ba9a21d7c4f
Subproject commit b0549bb2b4341e10502cc964df06d6148575c1e1

1
project/lib/harfbuzz Submodule

@ -0,0 +1 @@
Subproject commit 2ba0b9ee94e4fdea5c3e9d20fa73eb893c0bb95e

1
project/lib/hashlink Submodule

@ -0,0 +1 @@
Subproject commit 9888913ed2e1eef9fc03085100c92bd44985c781

1
project/lib/jpeg Submodule

@ -0,0 +1 @@
Subproject commit 5cf79606784f0616590e6a3a7fdf17ad32a6df9b

1
project/lib/lzma Submodule

@ -0,0 +1 @@
Subproject commit 5748ce6ad668bb10e1a1fe322b37245d0053e71a

1
project/lib/mbedtls Submodule

@ -0,0 +1 @@
Subproject commit ab0af45d11db04bd6e42ccfabe1b8d8deaae3243

1
project/lib/mojoal Submodule

@ -0,0 +1 @@
Subproject commit a9e2f30b04f10df1912d06ff5a610edda4677ba5

1
project/lib/neko Submodule

@ -0,0 +1 @@
Subproject commit d8a3b463861779656a78c1a5e31c013580642185

1
project/lib/ogg Submodule

@ -0,0 +1 @@
Subproject commit db5c7a49ce7ebda47b15b78471e78fb7f2483e22

1
project/lib/openal Submodule

@ -0,0 +1 @@
Subproject commit 326133368c3d7149d0ab4a98fc96f654553094a7

1
project/lib/pixman Submodule

@ -0,0 +1 @@
Subproject commit 0cb4fbe3241988a5d6b51d3551998ec6837c75a1

1
project/lib/png Submodule

@ -0,0 +1 @@
Subproject commit e4a31f024b6158aaaf55a43502f574d5f5d1c894

1
project/lib/sdl Submodule

@ -0,0 +1 @@
Subproject commit 8ea38ebedc846faa547693f60bcd213b21370982

@ -0,0 +1 @@
Subproject commit 4927ea8f44fa0151dc8e0a2b79a13dbd7827cc48

1
project/lib/vorbis Submodule

@ -0,0 +1 @@
Subproject commit 84c023699cdf023a32fa4ded32019f194afcdad0

1
project/lib/vpx Submodule

@ -0,0 +1 @@
Subproject commit fbf63dff1f528d44f24bd662abb89fd01a4a1c25

1
project/lib/webm Submodule

@ -0,0 +1 @@
Subproject commit 6c1e511f487eaea026d94d0c6494a617155b5cfb

1
project/lib/zlib Submodule

@ -0,0 +1 @@
Subproject commit 545f1949635949159fa6282e81712aec32b5d4f1

View file

@ -387,21 +387,8 @@ class CharSelectSubState extends MusicBeatSubState
}
else
{
var temp:FlxSprite = new FlxSprite();
var temp:Lock = new Lock(0, 0, i);
temp.ID = 1;
temp.frames = Paths.getSparrowAtlas("charSelect/locks");
var lockIndex:Int = i + 1;
if (i == 3) lockIndex = 3;
if (i >= 4) lockIndex = i - 2;
temp.animation.addByIndices("idle", "LOCK FULL " + lockIndex + " instance 1", [0], "", 24);
temp.animation.addByIndices("selected", "LOCK FULL " + lockIndex + " instance 1", [3, 4, 5], "", 24, false);
temp.animation.addByIndices("clicked", "LOCK FULL " + lockIndex + " instance 1", [9, 10, 11, 12, 13, 14, 15], "", 24, false);
temp.animation.play("idle");
grpIcons.add(temp);
}
@ -677,6 +664,11 @@ class CharSelectSubState extends MusicBeatSubState
function spamOnStep():Void
{
if (FlxG.keys.justPressed.B)
{
cursorY = 3;
cursorX = 3;
}
if (spamUp || spamDown || spamLeft || spamRight)
{
// selectSound.changePitchBySemitone(1);
@ -713,19 +705,20 @@ class CharSelectSubState extends MusicBeatSubState
switch (member.ID)
{
case 1:
var lock:Lock = cast member;
if (index == getCurrentSelected())
{
switch (member.animation.curAnim.name)
switch (lock.getCurrentAnimation())
{
case "idle":
member.animation.play("selected");
lock.playAnimation("selected");
case "selected" | "clicked":
if (controls.ACCEPT) member.animation.play("clicked", true);
if (controls.ACCEPT) lock.playAnimation((FlxG.keys.pressed.CONTROL) ? "unlock" : "clicked", true);
}
}
else
{
member.animation.play("idle");
lock.playAnimation("idle");
}
case 0:
var memb:PixelatedIcon = cast member;

View file

@ -0,0 +1,35 @@
package funkin.ui.charSelect;
import flixel.util.FlxColor;
import flxanimate.effects.FlxTint;
import funkin.graphics.adobeanimate.FlxAtlasSprite;
class Lock extends FlxAtlasSprite
{
var colors:Array<FlxColor> = [
0x31F2A5, 0x20ECCD, 0x24D9E8,
0x20ECCD, 0x20C8D4, 0x209BDD,
0x209BDD, 0x2362C9, 0x243FB9
]; // lock colors, in a nx3 matrix format
public function new(x:Float = 0, y:Float = 0, index:Int)
{
super(x, y, Paths.animateAtlas("charSelect/lock"));
var tint:FlxTint = new FlxTint(colors[index], 1);
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 symbol = anim.symbolDictionary[name];
if (symbol != null && symbol.timeline.get("color") != null) symbol.timeline.get("color").get(0).colorEffect = tint;
}
for (symbol in arr)
{
func(symbol);
}
playAnimation("idle");
}
}