some folder stuff
This commit is contained in:
@@ -42,7 +42,7 @@ class DesktopMain extends MusicBeatState {
|
||||
#if windows
|
||||
try {
|
||||
wallpaper.loadGraphic(BitmapData.fromFile('${Sys.getEnv("AppData")}\\Microsoft\\Windows\\Themes\\TranscodedWallpaper'));
|
||||
} catch(e) #end wallpaper.loadGraphic(Paths.image("menuBG"));
|
||||
} catch(e) #end wallpaper.loadGraphic(Paths.image("menus/menuBG"));
|
||||
wallpaper.scrollFactor.set(0, 0); // anchor at top left
|
||||
wallpaper.antialiasing = true;
|
||||
add(wallpaper);
|
||||
|
||||
@@ -273,7 +273,7 @@ class PlayState extends MusicBeatState
|
||||
FlxG.worldBounds.set(0, 0, FlxG.width, FlxG.height);
|
||||
|
||||
// TODO: cool healthbar
|
||||
healthBarBG = new FlxSprite(0, FlxG.height * 0.9).loadGraphic(Paths.image('healthBar'));
|
||||
healthBarBG = new FlxSprite(0, FlxG.height * 0.9).loadGraphic(Paths.image('game/healthBar'));
|
||||
healthBarBG.screenCenter(X);
|
||||
healthBarBG.scrollFactor.set();
|
||||
add(healthBarBG);
|
||||
@@ -341,7 +341,7 @@ class PlayState extends MusicBeatState
|
||||
|
||||
var swagCounter:Int = 0;
|
||||
|
||||
var introSprites:Array<String> = [null, 'ready', "set", "go"];
|
||||
var introSprites:Array<String> = [null, 'game/ready', "game/set", "game/go"];
|
||||
var introSounds:Array<String> = ['intro3', 'intro2', "intro1", "introGo"];
|
||||
|
||||
startTimer = new FlxTimer().start(Conductor.crochet / 1000, function(tmr:FlxTimer)
|
||||
@@ -362,7 +362,7 @@ class PlayState extends MusicBeatState
|
||||
if (!event.cancelled) {
|
||||
if (event.spritePath != null) {
|
||||
var spr = event.spritePath;
|
||||
if (!Assets.exists(spr)) spr = Paths.image(spr);
|
||||
if (!Assets.exists(spr)) spr = Paths.image('$spr');
|
||||
|
||||
sprite = new FlxSprite().loadGraphic(spr);
|
||||
sprite.scrollFactor.set();
|
||||
@@ -511,7 +511,7 @@ class PlayState extends MusicBeatState
|
||||
{
|
||||
// FlxG.log.add(i);
|
||||
var babyArrow:Strum = new Strum((FlxG.width * 0.25) + (Note.swagWidth * (i - 2)) + ((FlxG.width / 2) * player), strumLine.y);
|
||||
babyArrow.ID = i + (player * 4);
|
||||
babyArrow.ID = i;
|
||||
|
||||
var event = scripts.event("onStrumCreation", new StrumCreationEvent(babyArrow, player, i));
|
||||
|
||||
@@ -1061,6 +1061,7 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
|
||||
public var endingSong:Bool = false;
|
||||
public var comboPos:FlxPoint = FlxPoint.get(FlxG.width * 0.55, -60);
|
||||
|
||||
private function popUpScore(strumtime:Float, score:Int = 350):Void
|
||||
{
|
||||
@@ -1068,10 +1069,6 @@ class PlayState extends MusicBeatState
|
||||
vocals.volume = 1;
|
||||
|
||||
var placement:String = Std.string(combo);
|
||||
|
||||
var coolText:FlxText = new FlxText(0, 0, 0, placement, 32);
|
||||
coolText.screenCenter();
|
||||
coolText.x = FlxG.width * 0.55;
|
||||
//
|
||||
|
||||
var rating:FlxSprite = new FlxSprite();
|
||||
@@ -1104,37 +1101,38 @@ class PlayState extends MusicBeatState
|
||||
daRating = 'bad';
|
||||
*/
|
||||
|
||||
var pixelShitPart1:String = "";
|
||||
var pixelShitPart2:String = '';
|
||||
var prefix:String = "";
|
||||
var suffix:String = '';
|
||||
|
||||
if (curStage.startsWith('school'))
|
||||
{
|
||||
pixelShitPart1 = 'weeb/pixelUI/';
|
||||
pixelShitPart2 = '-pixel';
|
||||
prefix = 'weeb/pixelUI/';
|
||||
suffix = '-pixel';
|
||||
}
|
||||
|
||||
rating.loadGraphic(Paths.image(pixelShitPart1 + daRating + pixelShitPart2));
|
||||
rating.loadGraphic(Paths.image('game/$prefix$daRating$suffix'));
|
||||
rating.screenCenter();
|
||||
rating.x = coolText.x - 40;
|
||||
rating.x = comboPos.x - 40;
|
||||
rating.y -= 60;
|
||||
rating.acceleration.y = 550;
|
||||
rating.velocity.y -= FlxG.random.int(140, 175);
|
||||
rating.velocity.x -= FlxG.random.int(0, 10);
|
||||
|
||||
var comboSpr:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'combo' + pixelShitPart2));
|
||||
var comboSpr:FlxSprite = new FlxSprite().loadGraphic(Paths.image('game/${prefix}combo$suffix'));
|
||||
comboSpr.screenCenter();
|
||||
comboSpr.x = coolText.x;
|
||||
comboSpr.x = comboPos.x;
|
||||
comboSpr.acceleration.y = 600;
|
||||
comboSpr.velocity.y -= 150;
|
||||
|
||||
comboSpr.velocity.x += FlxG.random.int(1, 10);
|
||||
|
||||
add(rating);
|
||||
add(comboSpr);
|
||||
|
||||
if (!curStage.startsWith('school'))
|
||||
{
|
||||
rating.setGraphicSize(Std.int(rating.width * 0.7));
|
||||
rating.scale.set(0.7, 0.7);
|
||||
rating.antialiasing = true;
|
||||
comboSpr.setGraphicSize(Std.int(comboSpr.width * 0.7));
|
||||
comboSpr.scale.set(0.7, 0.7);
|
||||
comboSpr.antialiasing = true;
|
||||
}
|
||||
else
|
||||
@@ -1146,18 +1144,19 @@ class PlayState extends MusicBeatState
|
||||
comboSpr.updateHitbox();
|
||||
rating.updateHitbox();
|
||||
|
||||
var seperatedScore:Array<Int> = [];
|
||||
var separatedScore:String = Std.string(combo).addZeros(3);
|
||||
|
||||
seperatedScore.push(Math.floor(combo / 100));
|
||||
seperatedScore.push(Math.floor((combo - (seperatedScore[0] * 100)) / 10));
|
||||
seperatedScore.push(combo % 10);
|
||||
|
||||
var daLoop:Int = 0;
|
||||
for (i in seperatedScore)
|
||||
for (i in 0...separatedScore.length)
|
||||
{
|
||||
var numScore:FlxSprite = new FlxSprite().loadGraphic(Paths.image(pixelShitPart1 + 'num' + Std.int(i) + pixelShitPart2));
|
||||
if (combo < 10 && combo != 0)
|
||||
break;
|
||||
|
||||
var e = separatedScore.charAt(i);
|
||||
|
||||
var numScore:FlxSprite = new FlxSprite().loadGraphic(Paths.image('game/${prefix}num$e$suffix'));
|
||||
numScore.screenCenter();
|
||||
numScore.x = coolText.x + (43 * daLoop) - 90;
|
||||
numScore.x = comboPos.x + (43 * i) - 90;
|
||||
numScore.y += 80;
|
||||
|
||||
if (!curStage.startsWith('school'))
|
||||
@@ -1175,7 +1174,6 @@ class PlayState extends MusicBeatState
|
||||
numScore.velocity.y -= FlxG.random.int(140, 160);
|
||||
numScore.velocity.x = FlxG.random.float(-5, 5);
|
||||
|
||||
if (combo >= 10 || combo == 0)
|
||||
add(numScore);
|
||||
|
||||
FlxTween.tween(numScore, {alpha: 0}, 0.2, {
|
||||
@@ -1185,17 +1183,12 @@ class PlayState extends MusicBeatState
|
||||
},
|
||||
startDelay: Conductor.crochet * 0.002
|
||||
});
|
||||
|
||||
daLoop++;
|
||||
}
|
||||
/*
|
||||
trace(combo);
|
||||
trace(seperatedScore);
|
||||
trace(separatedScore);
|
||||
*/
|
||||
|
||||
coolText.text = Std.string(seperatedScore);
|
||||
// add(coolText);
|
||||
|
||||
FlxTween.tween(rating, {alpha: 0}, 0.2, {
|
||||
startDelay: Conductor.crochet * 0.001
|
||||
});
|
||||
@@ -1203,7 +1196,6 @@ class PlayState extends MusicBeatState
|
||||
FlxTween.tween(comboSpr, {alpha: 0}, 0.2, {
|
||||
onComplete: function(tween:FlxTween)
|
||||
{
|
||||
coolText.destroy();
|
||||
comboSpr.destroy();
|
||||
|
||||
rating.destroy();
|
||||
|
||||
@@ -74,7 +74,7 @@ class FreeplayState extends MusicBeatState
|
||||
|
||||
// LOAD CHARACTERS
|
||||
|
||||
bg = new FlxSprite(0, 0, Paths.image('menuDesat'));
|
||||
bg = new FlxSprite(0, 0, Paths.image('menus/menuDesat'));
|
||||
if (songs.length > 0)
|
||||
bg.color = songs[0].color;
|
||||
add(bg);
|
||||
|
||||
@@ -21,25 +21,25 @@ class GitarooPause extends MusicBeatState
|
||||
if (FlxG.sound.music != null)
|
||||
FlxG.sound.music.stop();
|
||||
|
||||
var bg:FlxSprite = new FlxSprite().loadGraphic(Paths.image('pauseAlt/pauseBG'));
|
||||
var bg:FlxSprite = new FlxSprite().loadGraphic(Paths.image('menus/pauseAlt//pauseBG'));
|
||||
add(bg);
|
||||
|
||||
var bf:FlxSprite = new FlxSprite(0, 30);
|
||||
bf.frames = Paths.getSparrowAtlas('pauseAlt/bfLol');
|
||||
bf.frames = Paths.getSparrowAtlas('menus/pauseAlt//bfLol');
|
||||
bf.animation.addByPrefix('lol', "funnyThing", 13);
|
||||
bf.animation.play('lol');
|
||||
add(bf);
|
||||
bf.screenCenter(X);
|
||||
|
||||
replayButton = new FlxSprite(FlxG.width * 0.28, FlxG.height * 0.7);
|
||||
replayButton.frames = Paths.getSparrowAtlas('pauseAlt/pauseUI');
|
||||
replayButton.frames = Paths.getSparrowAtlas('menus/pauseAlt//pauseUI');
|
||||
replayButton.animation.addByPrefix('selected', 'bluereplay', 0, false);
|
||||
replayButton.animation.appendByPrefix('selected', 'yellowreplay');
|
||||
replayButton.animation.play('selected');
|
||||
add(replayButton);
|
||||
|
||||
cancelButton = new FlxSprite(FlxG.width * 0.58, replayButton.y);
|
||||
cancelButton.frames = Paths.getSparrowAtlas('pauseAlt/pauseUI');
|
||||
cancelButton.frames = Paths.getSparrowAtlas('menus/pauseAlt//pauseUI');
|
||||
cancelButton.animation.addByPrefix('selected', 'bluecancel', 0, false);
|
||||
cancelButton.animation.appendByPrefix('selected', 'cancelyellow');
|
||||
cancelButton.animation.play('selected');
|
||||
|
||||
@@ -53,7 +53,7 @@ class MainMenuState extends MusicBeatState
|
||||
|
||||
persistentUpdate = persistentDraw = true;
|
||||
|
||||
var bg:FlxSprite = new FlxSprite(-80).loadGraphic(Paths.image('menuBG'));
|
||||
var bg:FlxSprite = new FlxSprite(-80).loadGraphic(Paths.image('menus/menuBG'));
|
||||
bg.scrollFactor.x = 0;
|
||||
bg.scrollFactor.y = 0.18;
|
||||
bg.scale.set(1.15, 1.15);
|
||||
@@ -65,7 +65,7 @@ class MainMenuState extends MusicBeatState
|
||||
camFollow = new FlxObject(0, 0, 1, 1);
|
||||
add(camFollow);
|
||||
|
||||
magenta = new FlxSprite(-80).loadGraphic(Paths.image('menuDesat'));
|
||||
magenta = new FlxSprite(-80).loadGraphic(Paths.image('menus/menuDesat'));
|
||||
magenta.scrollFactor.x = 0;
|
||||
magenta.scrollFactor.y = 0.18;
|
||||
magenta.scale.set(1.15, 1.15);
|
||||
@@ -79,13 +79,11 @@ class MainMenuState extends MusicBeatState
|
||||
|
||||
menuItems = new FlxTypedGroup<FlxSprite>();
|
||||
add(menuItems);
|
||||
|
||||
var tex = Paths.getSparrowAtlas('FNF_main_menu_assets');
|
||||
|
||||
|
||||
for (i in 0...optionShit.length)
|
||||
{
|
||||
var menuItem:FlxSprite = new FlxSprite(0, 60 + (i * 160));
|
||||
menuItem.frames = tex;
|
||||
menuItem.frames = Paths.getSparrowAtlas('menus/mainmenu/${optionShit[i]}');;
|
||||
menuItem.animation.addByPrefix('idle', optionShit[i] + " basic", 24);
|
||||
menuItem.animation.addByPrefix('selected', optionShit[i] + " white", 24);
|
||||
menuItem.animation.play('idle');
|
||||
|
||||
@@ -100,7 +100,7 @@ class StoryMenuState extends MusicBeatState
|
||||
rankText.size = scoreText.size;
|
||||
rankText.screenCenter(X);
|
||||
|
||||
var ui_tex = Paths.getSparrowAtlas('campaign_menu_UI_assets');
|
||||
var ui_tex = Paths.getSparrowAtlas('menus/storymenu/assets');
|
||||
var yellowBG:FlxSprite = new FlxSprite(0, 56).makeGraphic(FlxG.width, 400, 0xFFF9CF51);
|
||||
|
||||
grpWeekText = new FlxTypedGroup<MenuItem>();
|
||||
@@ -459,7 +459,7 @@ class MenuCharacter extends FlxSprite
|
||||
|
||||
this.character = character;
|
||||
|
||||
var tex = Paths.getSparrowAtlas('campaign_menu_UI_characters');
|
||||
var tex = Paths.getSparrowAtlas('menus/storymenu/characters');
|
||||
frames = tex;
|
||||
|
||||
animation.addByPrefix('bf', "BF idle dance white", 24);
|
||||
@@ -487,7 +487,7 @@ class MenuItem extends FlxSpriteGroup
|
||||
public function new(x:Float, y:Float, weekNum:Int = 0)
|
||||
{
|
||||
super(x, y);
|
||||
week = new FlxSprite().loadGraphic(Paths.image('storymenu/week' + weekNum));
|
||||
week = new FlxSprite().loadGraphic(Paths.image('menus/storymenu/week' + weekNum));
|
||||
add(week);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class OptionsMenu extends MusicBeatState {
|
||||
state: funkin.options.keybinds.KeybindsOptions
|
||||
},
|
||||
{
|
||||
name: 'Visuals',
|
||||
name: 'Gameplay',
|
||||
desc: 'Change Gameplay options such as Downscroll, Scroll Speed...',
|
||||
state: null
|
||||
}
|
||||
@@ -33,7 +33,7 @@ class OptionsMenu extends MusicBeatState {
|
||||
if (fromPlayState != null) OptionsMenu.fromPlayState = fromPlayState;
|
||||
}
|
||||
public override function create() {
|
||||
var bg:FlxSprite = new FlxSprite(-80).loadGraphic(Paths.image('menuBGBlue'));
|
||||
var bg:FlxSprite = new FlxSprite(-80).loadGraphic(Paths.image('menus/menuBGBlue'));
|
||||
bg.scrollFactor.set();
|
||||
bg.scale.set(1.15, 1.15);
|
||||
bg.updateHitbox();
|
||||
|
||||
@@ -15,6 +15,12 @@ class OptionsScreen extends MusicBeatState {
|
||||
public override function create() {
|
||||
super.create();
|
||||
|
||||
|
||||
bg = new FlxSprite(-80).loadGraphic(Paths.image('menus/menuBG'));
|
||||
bg.scrollFactor.set();
|
||||
bg.scale.set(1.15, 1.15);
|
||||
bg.updateHitbox();
|
||||
bg.screenCenter();
|
||||
bg.antialiasing = true;
|
||||
add(bg);
|
||||
}
|
||||
}
|
||||
@@ -106,8 +106,8 @@ class KeybindsOptions extends MusicBeatSubstate {
|
||||
|
||||
isSubState = FlxG.state != this;
|
||||
alphabets = new FlxTypedGroup<KeybindSetting>();
|
||||
bg = new FlxSprite(-80).loadGraphic(Paths.image(isSubState ? 'menuTransparent' : 'menuBGBlue'));
|
||||
coloredBG = new FlxSprite(-80).loadGraphic(Paths.image('menuDesat'));
|
||||
bg = new FlxSprite(-80).loadGraphic(Paths.image(isSubState ? 'menus/menuTransparent' : 'menus/menuBGBlue'));
|
||||
coloredBG = new FlxSprite(-80).loadGraphic(Paths.image('menus/menuDesat'));
|
||||
for(bg in [bg, coloredBG]) {
|
||||
bg.scrollFactor.set();
|
||||
bg.scale.set(1.15, 1.15);
|
||||
|
||||
@@ -27,6 +27,11 @@ class CoolUtil
|
||||
return v == null ? defaultValue : v;
|
||||
}
|
||||
|
||||
public static function addZeros(str:String, num:Int) {
|
||||
while(str.length < num) str = '0${str}';
|
||||
return str;
|
||||
}
|
||||
|
||||
public static function getSizeString(size:UInt):String {
|
||||
var labels = ["B", "KB", "MB", "GB", "TB"];
|
||||
var rSize:Float = size;
|
||||
|
||||
@@ -64,10 +64,17 @@ class Alphabet extends FlxSpriteGroup
|
||||
var xml = new Access(Xml.parse(Assets.getText(path)).firstElement());
|
||||
AlphaCharacter.boldAnims = [];
|
||||
AlphaCharacter.letterAnims = [];
|
||||
AlphaCharacter.boldAlphabetPath = AlphaCharacter.letterAlphabetPath = 'ui/alphabet';
|
||||
|
||||
for(e in xml.elements) {
|
||||
var bold = e.name == "bold";
|
||||
var list = bold ? AlphaCharacter.boldAnims : AlphaCharacter.letterAnims;
|
||||
if (e.has.spritesheet) {
|
||||
if (bold)
|
||||
AlphaCharacter.boldAlphabetPath = e.att.spritesheet;
|
||||
else
|
||||
AlphaCharacter.letterAlphabetPath = e.att.spritesheet;
|
||||
}
|
||||
for(e in e.nodes.letter) {
|
||||
if (!e.has.char || !e.has.anim) continue;
|
||||
var name = e.att.char;
|
||||
@@ -288,6 +295,10 @@ class Alphabet extends FlxSpriteGroup
|
||||
class AlphaCharacter extends FlxSprite
|
||||
{
|
||||
@:dox(hide) @:noCompletion public static var __alphaPath:String = null;
|
||||
|
||||
public static var letterAlphabetPath:String;
|
||||
public static var boldAlphabetPath:String;
|
||||
|
||||
public static var boldAnims:Map<String, String> = [];
|
||||
public static var letterAnims:Map<String, String> = [];
|
||||
|
||||
@@ -307,8 +318,6 @@ class AlphaCharacter extends FlxSprite
|
||||
public function new(x:Float, y:Float)
|
||||
{
|
||||
super(x, y);
|
||||
var tex = Paths.getSparrowAtlas('alphabet');
|
||||
frames = tex;
|
||||
|
||||
antialiasing = true;
|
||||
}
|
||||
@@ -319,7 +328,8 @@ class AlphaCharacter extends FlxSprite
|
||||
if (boldAnims[letter] == null) {
|
||||
visible = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
frames = Paths.getSparrowAtlas(boldAlphabetPath);
|
||||
animation.addByPrefix(letter, boldAnims[letter], 24);
|
||||
animation.play(letter);
|
||||
updateHitbox();
|
||||
@@ -330,7 +340,8 @@ class AlphaCharacter extends FlxSprite
|
||||
if (letterAnims[letter] == null) {
|
||||
visible = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
frames = Paths.getSparrowAtlas(letterAlphabetPath);
|
||||
animation.addByPrefix(letter, letterAnims[letter], 24);
|
||||
animation.play(letter);
|
||||
updateHitbox();
|
||||
@@ -338,35 +349,4 @@ class AlphaCharacter extends FlxSprite
|
||||
y = (110 - height);
|
||||
y += row * 60;
|
||||
}
|
||||
|
||||
public function createNumber(letter:String):Void
|
||||
{
|
||||
animation.addByPrefix(letter, letter, 24);
|
||||
animation.play(letter);
|
||||
|
||||
updateHitbox();
|
||||
}
|
||||
|
||||
public function createSymbol(letter:String)
|
||||
{
|
||||
switch (letter)
|
||||
{
|
||||
case '.':
|
||||
animation.addByPrefix(letter, 'period', 24);
|
||||
animation.play(letter);
|
||||
y += 50;
|
||||
case "'":
|
||||
animation.addByPrefix(letter, 'apostraphie', 24);
|
||||
animation.play(letter);
|
||||
y -= 0;
|
||||
case "?":
|
||||
animation.addByPrefix(letter, 'question mark', 24);
|
||||
animation.play(letter);
|
||||
case "!":
|
||||
animation.addByPrefix(letter, 'exclamation point', 24);
|
||||
animation.play(letter);
|
||||
}
|
||||
|
||||
updateHitbox();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user