Skip to content

Commit

Permalink
cooler spirit effect
Browse files Browse the repository at this point in the history
  • Loading branch information
MaybeMaru committed May 12, 2024
1 parent fd59981 commit f8e6640
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 38 deletions.
67 changes: 34 additions & 33 deletions assets/preload/data/characters/bf.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
{
"allowLod": true,
"imagePath": "week1/BOYFRIEND",
"isGF": false,
"icon": "bf",
"camOffsets": [100,100],
"icon": "bf",
"isGF": false,
"scale": 1,
"charOffsets": [0,0],
"anims": [
{
"offsets": [301,270],
"indices": [],
"loop": false,
"framerate": 24,
"animFile": "boyfriend attack",
"animName": "attack"
},
{
"offsets": [-2,1],
"indices": [],
Expand All @@ -21,12 +16,12 @@
"animName": "scared"
},
{
"offsets": [-42,20],
"offsets": [301,270],
"indices": [],
"loop": false,
"framerate": 24,
"animFile": "BF NOTE RIGHT MISS",
"animName": "singRIGHTmiss"
"animFile": "boyfriend attack",
"animName": "attack"
},
{
"offsets": [-20,-51],
Expand All @@ -37,12 +32,12 @@
"animName": "singDOWN"
},
{
"offsets": [8,20],
"offsets": [-42,20],
"indices": [],
"loop": false,
"framerate": 24,
"animFile": "BF NOTE LEFT MISS",
"animName": "singLEFTmiss"
"animFile": "BF NOTE RIGHT MISS",
"animName": "singRIGHTmiss"
},
{
"offsets": [-37,28],
Expand All @@ -53,12 +48,12 @@
"animName": "singUP"
},
{
"offsets": [-27,-40],
"offsets": [8,20],
"indices": [],
"loop": false,
"framerate": 24,
"animFile": "bf pre attack",
"animName": "preattack"
"animFile": "BF NOTE LEFT MISS",
"animName": "singLEFTmiss"
},
{
"offsets": [18,19],
Expand All @@ -69,12 +64,12 @@
"animName": "hit"
},
{
"offsets": [2,5],
"offsets": [-27,-40],
"indices": [],
"loop": false,
"framerate": 24,
"animFile": "BF HEY",
"animName": "hey"
"animFile": "bf pre attack",
"animName": "preattack"
},
{
"offsets": [0,0],
Expand All @@ -85,12 +80,12 @@
"animName": "idle"
},
{
"offsets": [-11,-19],
"offsets": [2,5],
"indices": [],
"loop": false,
"framerate": 24,
"animFile": "BF NOTE DOWN MISS",
"animName": "singDOWNmiss"
"animFile": "BF HEY",
"animName": "hey"
},
{
"offsets": [-44,-6],
Expand All @@ -101,21 +96,29 @@
"animName": "singRIGHT"
},
{
"offsets": [10,-7],
"offsets": [-22,-19],
"indices": [],
"loop": false,
"framerate": 24,
"animFile": "BF NOTE LEFT0",
"animName": "singLEFT"
"animFile": "BF NOTE DOWN MISS",
"animName": "singDOWNmiss"
},
{
"offsets": [-40,23],
"offsets": [-37,24],
"indices": [],
"loop": false,
"framerate": 24,
"animFile": "BF NOTE UP MISS",
"animName": "singUPmiss"
},
{
"offsets": [10,-7],
"indices": [],
"loop": false,
"framerate": 24,
"animFile": "BF NOTE LEFT0",
"animName": "singLEFT"
},
{
"offsets": [6,-14],
"indices": [],
Expand All @@ -125,11 +128,9 @@
"animName": "dodge"
}
],
"charOffsets": [0,0],
"scale": 1,
"flipX": true,
"isPlayer": true,
"gameOverChar": "bf-dead",
"flipX": true,
"antialiasing": true,
"gameOverChar": "bf-dead",
"gameOverSuffix": ""
}
17 changes: 15 additions & 2 deletions assets/preload/data/characters/spirit.hx
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
var evilIconTrail:FlxTrail;
var evilIconTrail;

function createChar() {
var evilTrail:FlxTrail = new FlxTrail(ScriptChar, null, 4, 24, 0.3, 0.069);
var evilTrail = new FlxTrail(ScriptChar, null, 4, 24, 0.3, 0.069);
evilTrail.color = 0xffff3b6c;
evilTrail.blend = getBlendMode("add");
ScriptChar.group.insert(0, evilTrail);

evilIconTrail = new FlxTrail(ScriptChar.iconSpr, null, 4, 24, 0.3, 0.069);
evilIconTrail.color = 0xffff3b6c;
evilIconTrail.blend = getBlendMode("add");
State.iconGroup.insert(0, evilIconTrail);
}

function updatePost() {
var lodScale = ScriptChar.iconSpr.lodScale;
if (lodScale > 1) {
evilIconTrail.scale.set(lodScale, lodScale);
var offset = -((lodScale <= 2) ? 70 : ((lodScale <= 4) ? 220 : 500));
evilIconTrail.offset.set(offset, offset);
}
}

function destroyChar() {
evilIconTrail.destroy();
}
4 changes: 1 addition & 3 deletions source/funkin/objects/NotesGroup.hx
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,7 @@ class NotesGroup extends Group

if (hasControl)
{
removeList.fastForEach((note, i) -> {
note.removeNote();
});
removeList.fastForEach((note, i) -> note.removeNote());

final ghostOff:Bool = isPlayState ? !game.ghostTapEnabled : false;

Expand Down

0 comments on commit f8e6640

Please sign in to comment.