Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Fix idleLoop code + other stuff #2653

Merged
merged 28 commits into from
Nov 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8713556
MOVE WEEB HERE
Sep 11, 2021
6f0ecdf
Merge pull request #2227 from XMLskid/patch-2
Kade-github Sep 23, 2021
46951b2
Revert "MOVE WEEB HERE"
Kade-github Sep 23, 2021
30c630a
Merge pull request #2347 from KadeDev/revert-2227-patch-2
Kade-github Sep 23, 2021
44788c4
Create staleIssue.yml
Kade-github Oct 17, 2021
baf2973
make it run hourly
Kade-github Oct 17, 2021
28dfd24
Update staleIssue.yml
Kade-github Oct 17, 2021
e52d845
Update staleIssue.yml
Kade-github Oct 17, 2021
e841168
Update staleIssue.yml
Kade-github Oct 17, 2021
d1ecc2f
Create closeCompileIssues.yml
Kade-github Oct 17, 2021
572ab5f
Update staleIssue.yml
Kade-github Oct 17, 2021
1761318
oops
Kade-github Oct 17, 2021
ce213b0
Update closeCompileIssues.yml
Kade-github Oct 17, 2021
698a891
Update closeCompileIssues.yml
Kade-github Oct 17, 2021
761d500
Update closeCompileIssues.yml
Kade-github Oct 17, 2021
cd4027b
Update staleIssue.yml
Kade-github Oct 17, 2021
f732d5d
Merge pull request #2570 from KadeDev/master
Kade-github Oct 24, 2021
36d7dec
Merge pull request #2578 from KadeDev/master
Kade-github Oct 24, 2021
37f705a
Merge pull request #2582 from KadeDev/master
Kade-github Oct 25, 2021
bf87a92
Merge pull request #2584 from KadeDev/master
Kade-github Oct 25, 2021
45615b9
Repaired HTML5 build CI.
EliteMasterEric Oct 25, 2021
b1fe905
Merge pull request #2590 from MasterEric/bugfix/html5-build-ci
Kade-github Oct 30, 2021
1ff9705
fix idleLoop issue
ActualMandM Oct 30, 2021
a455e7d
Run files through haxe-formatter
ActualMandM Oct 30, 2021
67dc863
Merge stable into master
ActualMandM Oct 30, 2021
13b15a0
Move spirit over to character json
ActualMandM Oct 31, 2021
3690650
Move BF (Pixel) over to character json
ActualMandM Oct 31, 2021
d87164a
oops
ActualMandM Oct 31, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/closeCompileIssues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Autocloser
on:
issues:
types: [opened, edited, reopened]
jobs:
autoclose:
runs-on: ubuntu-latest
steps:
- name: Autoclose issues
uses: arkon/issue-closer-action@v3.4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
rules: |
[
{
"type": "title",
"regex": ".*compile*",
"message": "@${issue.user.login} this issue was automatically closed because we do not offer support for compiling Kade Engine! Please read the https://kadedev.github.io/Kade-Engine/building page"
}
]
18 changes: 18 additions & 0 deletions .github/workflows/staleIssue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Close inactive issues
on: [workflow_dispatch]

jobs:
close-issues:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
days-before-issue-stale: 7
days-before-issue-close: 0
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 7 days with no activity."
close-issue-message: "This issue was closed because it has become stale"
days-before-pr-stale: -1
days-before-pr-close: -1
repo-token: ${{ secrets.GITHUB_TOKEN }}
exempt-issue-labels: false
2 changes: 1 addition & 1 deletion assets/preload/data/characters/bf-car.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"offsets": [-5, 0]
},
{
"name": "idleHair",
"name": "idleLoop",
"prefix": "BF idle dance",
"offsets": [-5, 0],
"frameIndices": [10, 11, 12, 13],
Expand Down
56 changes: 56 additions & 0 deletions assets/preload/data/characters/bf-pixel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"name": "Boyfriend (Pixel Day)",
"asset": "characters/bfPixel",
"barColor": "#31B0D1",
"flipX": true,
"scale": 6,
"antialiasing": false,
"startingAnim": "idle",
"animations": [
{
"name": "idle",
"prefix": "BF IDLE",
"offsets": [0, 0]
},
{
"name": "singUP",
"prefix": "BF UP NOTE",
"offsets": [0, 0]
},
{
"name": "singLEFT",
"prefix": "BF LEFT NOTE",
"offsets": [0, 0]
},
{
"name": "singRIGHT",
"prefix": "BF RIGHT NOTE",
"offsets": [0, 0]
},
{
"name": "singDOWN",
"prefix": "BF DOWN NOTE",
"offsets": [0, 0]
},
{
"name": "singUPmiss",
"prefix": "BF UP MISS",
"offsets": [0, 0]
},
{
"name": "singLEFTmiss",
"prefix": "BF LEFT MISS",
"offsets": [0, 0]
},
{
"name": "singRIGHTmiss",
"prefix": "BF RIGHT MISS",
"offsets": [0, 0]
},
{
"name": "singDOWNmiss",
"prefix": "BF DOWN MISS",
"offsets": [0, 0]
}
]
}
2 changes: 1 addition & 1 deletion assets/preload/data/characters/gf-car.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"frameIndices": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]
},
{
"name": "idleHair",
"name": "idleLoop",
"prefix": "GF Dancing Beat Hair blowing CAR",
"offsets": [0, 0],
"frameIndices": [10, 11, 12, 25, 26, 27]
Expand Down
2 changes: 1 addition & 1 deletion assets/preload/data/characters/mom-car.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"offsets": [0, 0]
},
{
"name": "idleHair",
"name": "idleLoop",
"prefix": "Mom Idle",
"offsets": [0, 0],
"frameIndices": [10, 11, 12, 13],
Expand Down
36 changes: 36 additions & 0 deletions assets/preload/data/characters/spirit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "Spirit",
"asset": "characters/spirit",
"barColor": "#FF3C6E",
"scale": 6,
"antialiasing": false,
"usePackerAtlas": true,
"startingAnim": "idle",
"animations": [
{
"name": "idle",
"prefix": "idle spirit_",
"offsets": [-220, -280]
},
{
"name": "singUP",
"prefix": "up_",
"offsets": [-220, -240]
},
{
"name": "singLEFT",
"prefix": "left_",
"offsets": [-200, -280]
},
{
"name": "singRIGHT",
"prefix": "right_",
"offsets": [-220, -280]
},
{
"name": "singDOWN",
"prefix": "spirit down_",
"offsets": [170, 110]
}
]
}
9 changes: 0 additions & 9 deletions assets/shared/images/characters/bf-pixelOffsets.txt

This file was deleted.

5 changes: 0 additions & 5 deletions assets/shared/images/characters/spiritOffsets.txt

This file was deleted.

9 changes: 0 additions & 9 deletions source/Boyfriend.hx
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,15 @@ class Boyfriend extends Character
if (!debugMode)
{
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 (curCharacter.endsWith('-car') && !animation.curAnim.name.startsWith('sing') && animation.curAnim.finished)
playAnim('idleHair');

if (animation.curAnim.name == 'firstDeath' && animation.curAnim.finished)
{
playAnim('deathLoop');
}
}

super.update(elapsed);
Expand Down
103 changes: 29 additions & 74 deletions source/Character.hx
Original file line number Diff line number Diff line change
Expand Up @@ -30,60 +30,7 @@ class Character extends FlxSprite
curCharacter = character;
this.isPlayer = isPlayer;

var tex:FlxAtlasFrames;
antialiasing = FlxG.save.data.antialiasing;

switch (curCharacter)
{
case 'bf-pixel':
frames = Paths.getSparrowAtlas('bfPixel', 'shared', true);
animation.addByPrefix('idle', 'BF IDLE', 24, false);
animation.addByPrefix('singUP', 'BF UP NOTE', 24, false);
animation.addByPrefix('singLEFT', 'BF LEFT NOTE', 24, false);
animation.addByPrefix('singRIGHT', 'BF RIGHT NOTE', 24, false);
animation.addByPrefix('singDOWN', 'BF DOWN NOTE', 24, false);
animation.addByPrefix('singUPmiss', 'BF UP MISS', 24, false);
animation.addByPrefix('singLEFTmiss', 'BF LEFT MISS', 24, false);
animation.addByPrefix('singRIGHTmiss', 'BF RIGHT MISS', 24, false);
animation.addByPrefix('singDOWNmiss', 'BF DOWN MISS', 24, false);

loadOffsetFile(curCharacter);

setGraphicSize(Std.int(width * 6));
updateHitbox();

playAnim('idle');

width -= 100;
height -= 100;

antialiasing = false;

barColor = 0xFF31b0d1;

flipX = true;

case 'spirit':
frames = Paths.getPackerAtlas('spirit', 'shared', true);
animation.addByPrefix('idle', "idle spirit_", 24, false);
animation.addByPrefix('singUP', "up_", 24, false);
animation.addByPrefix('singRIGHT', "right_", 24, false);
animation.addByPrefix('singLEFT', "left_", 24, false);
animation.addByPrefix('singDOWN', "spirit down_", 24, false);

loadOffsetFile(curCharacter);
barColor = 0xFFff3c6e;

setGraphicSize(Std.int(width * 6));
updateHitbox();

playAnim('idle');

antialiasing = false;

default:
parseDataFile();
}
parseDataFile();

if (curCharacter.startsWith('bf'))
dance();
Expand Down Expand Up @@ -124,8 +71,13 @@ class Character extends FlxSprite
}

var data:CharacterData = cast jsonData;
var tex:FlxAtlasFrames;

if (data.usePackerAtlas)
tex = Paths.getPackerAtlas(data.asset, 'shared');
else
tex = Paths.getSparrowAtlas(data.asset, 'shared');

var tex:FlxAtlasFrames = Paths.getSparrowAtlas(data.asset, 'shared');
frames = tex;
if (frames != null)
for (anim in data.animations)
Expand Down Expand Up @@ -180,18 +132,6 @@ class Character extends FlxSprite
holdTimer += elapsed;
}

if (curCharacter.endsWith('-car')
&& !animation.curAnim.name.startsWith('sing')
&& animation.curAnim.finished
&& animation.getByName('idleHair') != null)
playAnim('idleHair');

if (animation.getByName('idleLoop') != null)
{
if (!animation.curAnim.name.startsWith('sing') && animation.curAnim.finished)
playAnim('idleLoop');
}

var dadVar:Float = 4;

if (curCharacter == 'dad')
Expand All @@ -207,14 +147,23 @@ class Character extends FlxSprite
}
}

switch (curCharacter)
if (!debugMode)
{
case 'gf':
if (animation.curAnim.name == 'hairFall' && animation.curAnim.finished)
{
danced = true;
playAnim('danceRight');
}
if (animation.getByName('idleLoop') != null)
{
if (!animation.curAnim.name.startsWith('sing') && animation.curAnim.finished)
playAnim('idleLoop');
}

switch (curCharacter)
{
case 'gf':
if (animation.curAnim.name == 'hairFall' && animation.curAnim.finished)
{
danced = true;
playAnim('danceRight');
}
}
}

super.update(elapsed);
Expand Down Expand Up @@ -341,6 +290,12 @@ typedef CharacterData =
* @default true
*/
var ?antialiasing:Bool;

/**
* Whether this character uses PackerAtlas.
* @default false
*/
var ?usePackerAtlas:Bool;
}

typedef AnimationData =
Expand Down
Loading