Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/poec987/FNF-V3
Browse files Browse the repository at this point in the history
  • Loading branch information
x8c8r committed Jun 29, 2024
2 parents 508b33b + 30060aa commit e15be3f
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 18 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions assets/shared/images/characters/weeb/sigmio.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<TextureAtlas imagePath="sigmio.png">
<!-- Created with Adobe Animate version 22.0.0.93 -->
<!-- http://www.adobe.com/products/animate.html -->
<SubTexture name="Down0000" x="0" y="0" width="321" height="257"/>
<SubTexture name="Down0001" x="0" y="0" width="321" height="257"/>
<SubTexture name="Down0002" x="321" y="0" width="321" height="257"/>
<SubTexture name="Down0003" x="321" y="0" width="321" height="257"/>
<SubTexture name="Down0004" x="321" y="0" width="321" height="257"/>
<SubTexture name="Down0005" x="321" y="0" width="321" height="257"/>
<SubTexture name="Down0006" x="321" y="0" width="321" height="257"/>
<SubTexture name="Left0000" x="642" y="0" width="321" height="257"/>
<SubTexture name="Left0001" x="642" y="0" width="321" height="257"/>
<SubTexture name="Left0002" x="963" y="0" width="321" height="257"/>
<SubTexture name="Left0003" x="963" y="0" width="321" height="257"/>
<SubTexture name="Left0004" x="963" y="0" width="321" height="257"/>
<SubTexture name="Left0005" x="963" y="0" width="321" height="257"/>
<SubTexture name="Left0006" x="963" y="0" width="321" height="257"/>
<SubTexture name="Right0000" x="1284" y="0" width="321" height="257"/>
<SubTexture name="Right0001" x="1284" y="0" width="321" height="257"/>
<SubTexture name="Right0002" x="1605" y="0" width="321" height="257"/>
<SubTexture name="Right0003" x="1605" y="0" width="321" height="257"/>
<SubTexture name="Right0004" x="1605" y="0" width="321" height="257"/>
<SubTexture name="Right0005" x="1605" y="0" width="321" height="257"/>
<SubTexture name="Right0006" x="1605" y="0" width="321" height="257"/>
<SubTexture name="Up0000" x="0" y="257" width="321" height="257"/>
<SubTexture name="Up0001" x="0" y="257" width="321" height="257"/>
<SubTexture name="Up0002" x="321" y="257" width="321" height="257"/>
<SubTexture name="Up0003" x="321" y="257" width="321" height="257"/>
<SubTexture name="Up0004" x="321" y="257" width="321" height="257"/>
<SubTexture name="Up0005" x="321" y="257" width="321" height="257"/>
<SubTexture name="Up0006" x="321" y="257" width="321" height="257"/>
<SubTexture name="danceLeft0000" x="642" y="257" width="321" height="257"/>
<SubTexture name="danceLeft0001" x="642" y="257" width="321" height="257"/>
<SubTexture name="danceLeft0002" x="642" y="257" width="321" height="257"/>
<SubTexture name="danceLeft0003" x="642" y="257" width="321" height="257"/>
<SubTexture name="danceLeft0004" x="642" y="257" width="321" height="257"/>
<SubTexture name="danceRight0000" x="963" y="257" width="321" height="257"/>
<SubTexture name="danceRight0001" x="963" y="257" width="321" height="257"/>
<SubTexture name="danceRight0002" x="963" y="257" width="321" height="257"/>
<SubTexture name="danceRight0003" x="963" y="257" width="321" height="257"/>
<SubTexture name="danceRight0004" x="963" y="257" width="321" height="257"/>
</TextureAtlas>
44 changes: 30 additions & 14 deletions source/Character.hx
Original file line number Diff line number Diff line change
Expand Up @@ -506,22 +506,24 @@ class Character extends FlxSprite
flipX = true;

case 'senpai':
frames = Paths.getSparrowAtlas('characters/weeb/senpai');
animation.addByPrefix('idle', 'Senpai Idle', 24, false);
animation.addByPrefix('singUP', 'SENPAI UP NOTE', 24, false);
animation.addByPrefix('singLEFT', 'SENPAI LEFT NOTE', 24, false);
animation.addByPrefix('singRIGHT', 'SENPAI RIGHT NOTE', 24, false);
animation.addByPrefix('singDOWN', 'SENPAI DOWN NOTE', 24, false);
frames = Paths.getSparrowAtlas('characters/weeb/sigmio');
animation.addByPrefix('danceLeft', 'danceLeft', 30, false);
animation.addByPrefix('danceRight', 'danceRight', 30, false);
animation.addByPrefix('singUP', 'Right', 30, false);
animation.addByPrefix('singLEFT', 'Left', 30, false);
animation.addByPrefix('singRIGHT', 'Up', 30, false);
animation.addByPrefix('singDOWN', 'Down', 30, false);

addOffset('idle');
addOffset("singUP", 5, 37);
addOffset('danceLeft');
addOffset('danceRight');
addOffset("singUP");
addOffset("singRIGHT");
addOffset("singLEFT", 40);
addOffset("singDOWN", 14);
addOffset("singLEFT");
addOffset("singDOWN");

playAnim('idle');
playAnim('danceRight');

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

antialiasing = false;
Expand Down Expand Up @@ -592,12 +594,16 @@ class Character extends FlxSprite

playAnim('idle');
default:
var charFile:String = Paths.txt("characters/"+curCharacter);
var charFileParams:Array<String> = CoolUtil.coolTextFile(charFile);
var charFile:String;
var charFileParams:Array<String> = [];

if (characterArray != null) {
charFileParams = characterArray;
}
else {
charFile = Paths.txt("characters/"+curCharacter);
charFileParams = CoolUtil.coolTextFile(charFile);
}

for (i in 0...charFileParams.length) {
charFileParams[i].trim();
Expand Down Expand Up @@ -744,6 +750,16 @@ class Character extends FlxSprite
else
playAnim('danceLeft');
}
case 'senpai':
if (!animation.curAnim.name.startsWith('hair'))
{
danced = !danced;

if (danced)
playAnim('danceRight');
else
playAnim('danceLeft');
}
default:
playAnim('idle');
}
Expand Down
42 changes: 41 additions & 1 deletion source/CharacterEditorState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,31 @@ class CharacterEditorState extends MusicBeatState

}

var charNameTB:FlxUIInputText;

function addCharacterUI():Void
{
var tab_group_character = new FlxUI(null, UI_box);
tab_group_character.name = 'Character';

charNameTB = new FlxUIInputText(100,50,180);

var loadCharButton:FlxUIButton = new FlxUIButton(10,10,"Load Character", function() {
loadCharacterTxt();
});

var saveCharButton:FlxUIButton = new FlxUIButton(10,30,"Save Character", function() {
saveCharacterTxt();
});

var newCharButton:FlxUIButton = new FlxUIButton(10,50,"New Character", function() {
newCharacterTxt();
});

tab_group_character.add(loadCharButton);
tab_group_character.add(saveCharButton);
tab_group_character.add(newCharButton);
tab_group_character.add(charNameTB);

UI_box.addGroup(tab_group_character);
}
Expand Down Expand Up @@ -273,13 +288,39 @@ class CharacterEditorState extends MusicBeatState
super.update(elapsed);
}

function newCharacterTxt() {
if (_file != null) {
_file = new FileReference();
}

charArray = ["sprite::BOYFRIEND","icon::0::1","anim::idle::BF idle dance::24","anim::singUP::BF idle dance::24","anim::singDOWN::BF idle dance::24","anim::singLEFT::BF idle dance::24","anim::singRIGHT::BF idle dance::24"];
charName = charNameTB.text.trim();
updateAnimsTab(true);
}

function loadCharacterTxt() {
_file = new FileReference();
var txtFilter = new FileFilter("Character Text File", "*.txt");
_file.addEventListener(Event.SELECT, onBrowseComplete);
_file.browse([txtFilter]);
}

function saveCharacterTxt() {
var saveData:String = "";
for (i in 0...charArray.length) {
saveData = saveData + charArray[i].trim() + "\n";
}
_file = new FileReference();
_file.addEventListener(Event.COMPLETE, onSaveComplete);
_file.save(saveData, charName.trim()+".txt");
}

function onSaveComplete(_) {
_file.removeEventListener(Event.COMPLETE, onSaveComplete);
_file = null;
trace("SUCCESSFULLY SAVED CHARACTER");
}

function onBrowseComplete(_):Void {
_file.load();
textData = _file.data.toString();
Expand All @@ -290,7 +331,6 @@ class CharacterEditorState extends MusicBeatState
add(char);
updateAnimsTab();
_file.removeEventListener(Event.SELECT, onBrowseComplete);
_file = null;
}

function loadAnims() {
Expand Down
5 changes: 2 additions & 3 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,7 @@ class PlayState extends MusicBeatState
case 'parents-christmas':
dad.x -= 500;
case 'senpai':
dad.x += 150;
dad.y += 360;
dad.y += 250;
camPos.set(dad.getGraphicMidpoint().x + 300, dad.getGraphicMidpoint().y);
case 'senpai-angry':
dad.x += 150;
Expand Down Expand Up @@ -1702,7 +1701,7 @@ class PlayState extends MusicBeatState
case 'mom':
camFollow.y = dad.getMidpoint().y;
case 'senpai':
camFollow.y = dad.getMidpoint().y - 430;
camFollow.y = dad.getMidpoint().y - 200;
camFollow.x = dad.getMidpoint().x - 100;
case 'senpai-angry':
camFollow.y = dad.getMidpoint().y - 430;
Expand Down
3 changes: 3 additions & 0 deletions vscode-project.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#automatically generated do not edit
#@date Sat Jun 29 2024 03:18:32 GMT-0500 (Central Daylight Time)
-cp c:\users\cam\appdata\local\temp\8e05707c7e067ab4e2ebd5dea47d22f51847e1bb

0 comments on commit e15be3f

Please sign in to comment.