abstract shit for brandy
This commit is contained in:
@ -16,7 +16,7 @@
|
|||||||
<SubTexture name="BF idle dance white0011" x="1669" y="0" width="408" height="412" frameX="-2" frameY="0" frameWidth="411" frameHeight="412"/>
|
<SubTexture name="BF idle dance white0011" x="1669" y="0" width="408" height="412" frameX="-2" frameY="0" frameWidth="411" frameHeight="412"/>
|
||||||
<SubTexture name="BF idle dance white0012" x="1669" y="0" width="408" height="412" frameX="-2" frameY="0" frameWidth="411" frameHeight="412"/>
|
<SubTexture name="BF idle dance white0012" x="1669" y="0" width="408" height="412" frameX="-2" frameY="0" frameWidth="411" frameHeight="412"/>
|
||||||
<SubTexture name="BF idle dance white0013" x="1669" y="0" width="408" height="412" frameX="-2" frameY="0" frameWidth="411" frameHeight="412"/>
|
<SubTexture name="BF idle dance white0013" x="1669" y="0" width="408" height="412" frameX="-2" frameY="0" frameWidth="411" frameHeight="412"/>
|
||||||
<SubTexture name="Dad idle dance BLACK LINE0000" x="2087" y="0" width="429" height="759" frameX="0" frameY="-8" frameWidth="429" frameHeight="767"/>
|
<SubTexture name="c0000" x="2087" y="0" width="429" height="759" frameX="0" frameY="-8" frameWidth="429" frameHeight="767"/>
|
||||||
<SubTexture name="Dad idle dance BLACK LINE0001" x="2087" y="0" width="429" height="759" frameX="0" frameY="-8" frameWidth="429" frameHeight="767"/>
|
<SubTexture name="Dad idle dance BLACK LINE0001" x="2087" y="0" width="429" height="759" frameX="0" frameY="-8" frameWidth="429" frameHeight="767"/>
|
||||||
<SubTexture name="Dad idle dance BLACK LINE0002" x="2526" y="0" width="424" height="757" frameX="-2" frameY="-10" frameWidth="429" frameHeight="767"/>
|
<SubTexture name="Dad idle dance BLACK LINE0002" x="2526" y="0" width="424" height="757" frameX="-2" frameY="-10" frameWidth="429" frameHeight="767"/>
|
||||||
<SubTexture name="Dad idle dance BLACK LINE0003" x="2526" y="0" width="424" height="757" frameX="-2" frameY="-10" frameWidth="429" frameHeight="767"/>
|
<SubTexture name="Dad idle dance BLACK LINE0003" x="2526" y="0" width="424" height="757" frameX="-2" frameY="-10" frameWidth="429" frameHeight="767"/>
|
||||||
|
@ -11,6 +11,7 @@ import flixel.input.gamepad.FlxGamepadButton;
|
|||||||
import flixel.input.gamepad.FlxGamepadInputID;
|
import flixel.input.gamepad.FlxGamepadInputID;
|
||||||
import flixel.input.keyboard.FlxKey;
|
import flixel.input.keyboard.FlxKey;
|
||||||
|
|
||||||
|
#if (haxe >= "4.0.0")
|
||||||
enum abstract Action(String) to String from String
|
enum abstract Action(String) to String from String
|
||||||
{
|
{
|
||||||
var UP = "up";
|
var UP = "up";
|
||||||
@ -30,6 +31,28 @@ enum abstract Action(String) to String from String
|
|||||||
var PAUSE = "pause";
|
var PAUSE = "pause";
|
||||||
var RESET = "reset";
|
var RESET = "reset";
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
@:enum
|
||||||
|
abstract Action(String) to String from String
|
||||||
|
{
|
||||||
|
var UP = "up";
|
||||||
|
var LEFT = "left";
|
||||||
|
var RIGHT = "right";
|
||||||
|
var DOWN = "down";
|
||||||
|
var UP_P = "up-press";
|
||||||
|
var LEFT_P = "left-press";
|
||||||
|
var RIGHT_P = "right-press";
|
||||||
|
var DOWN_P = "down-press";
|
||||||
|
var UP_R = "up-release";
|
||||||
|
var LEFT_R = "left-release";
|
||||||
|
var RIGHT_R = "right-release";
|
||||||
|
var DOWN_R = "down-release";
|
||||||
|
var ACCEPT = "accept";
|
||||||
|
var BACK = "back";
|
||||||
|
var PAUSE = "pause";
|
||||||
|
var RESET = "reset";
|
||||||
|
}
|
||||||
|
#end
|
||||||
|
|
||||||
enum Device
|
enum Device
|
||||||
{
|
{
|
||||||
|
27
source/MenuCharacter.hx
Normal file
27
source/MenuCharacter.hx
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
package;
|
||||||
|
|
||||||
|
import flixel.FlxSprite;
|
||||||
|
import flixel.graphics.frames.FlxAtlasFrames;
|
||||||
|
|
||||||
|
class MenuCharacter extends FlxSprite
|
||||||
|
{
|
||||||
|
public var character:String;
|
||||||
|
|
||||||
|
public function new(x:Float, character:String = 'bf')
|
||||||
|
{
|
||||||
|
super(x);
|
||||||
|
|
||||||
|
this.character = character;
|
||||||
|
|
||||||
|
var tex = FlxAtlasFrames.fromSparrow(AssetPaths.campaign_menu_UI_characters__png, AssetPaths.campaign_menu_UI_characters__xml);
|
||||||
|
frames = tex;
|
||||||
|
|
||||||
|
animation.addByPrefix('bf', "BF idle dance white", 24);
|
||||||
|
animation.addByPrefix('gf', "GF Dancing Beat WHITE", 24);
|
||||||
|
animation.addByPrefix('dad', "Dad idle dance BLACK LINE", 24);
|
||||||
|
animation.addByPrefix('spooky', "spooky dance idle BLACK LINES", 24);
|
||||||
|
|
||||||
|
animation.play(character);
|
||||||
|
updateHitbox();
|
||||||
|
}
|
||||||
|
}
|
@ -15,12 +15,13 @@ class StoryMenuState extends MusicBeatState
|
|||||||
|
|
||||||
var weekData:Array<Dynamic> = [['Tutorial', 'Bopeebo', 'Fresh', 'Dad Battle'], ['Spookeez', 'South', 'Monster']];
|
var weekData:Array<Dynamic> = [['Tutorial', 'Bopeebo', 'Fresh', 'Dad Battle'], ['Spookeez', 'South', 'Monster']];
|
||||||
var weekUnlocked:Array<Bool> = [true, false];
|
var weekUnlocked:Array<Bool> = [true, false];
|
||||||
|
var weekCharacters:Array<Dynamic> = [['dad', 'bf', 'gf'], ['spooky', 'bf', 'gf']];
|
||||||
var curWeek:Int = 0;
|
var curWeek:Int = 0;
|
||||||
|
|
||||||
var txtTracklist:FlxText;
|
var txtTracklist:FlxText;
|
||||||
|
|
||||||
var grpWeekText:FlxTypedGroup<MenuItem>;
|
var grpWeekText:FlxTypedGroup<MenuItem>;
|
||||||
|
var grpWeekCharacters:FlxTypedGroup<MenuCharacter>;
|
||||||
|
|
||||||
var grpLocks:FlxTypedGroup<FlxSprite>;
|
var grpLocks:FlxTypedGroup<FlxSprite>;
|
||||||
|
|
||||||
@ -30,14 +31,12 @@ class StoryMenuState extends MusicBeatState
|
|||||||
{
|
{
|
||||||
scoreText = new FlxText(10, 10, 0, "SCORE: 49324858", 36);
|
scoreText = new FlxText(10, 10, 0, "SCORE: 49324858", 36);
|
||||||
scoreText.setFormat("VCR OSD Mono", 32);
|
scoreText.setFormat("VCR OSD Mono", 32);
|
||||||
add(scoreText);
|
|
||||||
|
|
||||||
var rankText:FlxText = new FlxText(0, 10);
|
var rankText:FlxText = new FlxText(0, 10);
|
||||||
rankText.text = 'RANK: GREAT';
|
rankText.text = 'RANK: GREAT';
|
||||||
rankText.setFormat("assets/fonts/vcr.ttf", 32);
|
rankText.setFormat("assets/fonts/vcr.ttf", 32);
|
||||||
rankText.size = scoreText.size;
|
rankText.size = scoreText.size;
|
||||||
rankText.screenCenter(X);
|
rankText.screenCenter(X);
|
||||||
add(rankText);
|
|
||||||
|
|
||||||
var ui_tex = FlxAtlasFrames.fromSparrow(AssetPaths.campaign_menu_UI_assets__png, AssetPaths.campaign_menu_UI_assets__xml);
|
var ui_tex = FlxAtlasFrames.fromSparrow(AssetPaths.campaign_menu_UI_assets__png, AssetPaths.campaign_menu_UI_assets__xml);
|
||||||
var yellowBG:FlxSprite = new FlxSprite(0, 56).makeGraphic(FlxG.width, 400, 0xFFF9CF51);
|
var yellowBG:FlxSprite = new FlxSprite(0, 56).makeGraphic(FlxG.width, 400, 0xFFF9CF51);
|
||||||
@ -45,6 +44,8 @@ class StoryMenuState extends MusicBeatState
|
|||||||
grpWeekText = new FlxTypedGroup<MenuItem>();
|
grpWeekText = new FlxTypedGroup<MenuItem>();
|
||||||
add(grpWeekText);
|
add(grpWeekText);
|
||||||
|
|
||||||
|
grpWeekCharacters = new FlxTypedGroup<MenuCharacter>();
|
||||||
|
|
||||||
grpLocks = new FlxTypedGroup<FlxSprite>();
|
grpLocks = new FlxTypedGroup<FlxSprite>();
|
||||||
add(grpLocks);
|
add(grpLocks);
|
||||||
|
|
||||||
@ -76,6 +77,28 @@ class StoryMenuState extends MusicBeatState
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (char in 0...3)
|
||||||
|
{
|
||||||
|
var weekCharacterThing:MenuCharacter = new MenuCharacter((FlxG.width * 0.25) * (1 + char) - 150, weekCharacters[curWeek][char]);
|
||||||
|
weekCharacterThing.y += 70;
|
||||||
|
weekCharacterThing.antialiasing = true;
|
||||||
|
switch (weekCharacterThing.character)
|
||||||
|
{
|
||||||
|
case 'dad':
|
||||||
|
weekCharacterThing.setGraphicSize(Std.int(weekCharacterThing.width * 0.5));
|
||||||
|
weekCharacterThing.updateHitbox();
|
||||||
|
|
||||||
|
case 'bf':
|
||||||
|
weekCharacterThing.setGraphicSize(Std.int(weekCharacterThing.width * 0.9));
|
||||||
|
weekCharacterThing.updateHitbox();
|
||||||
|
case 'gf':
|
||||||
|
weekCharacterThing.setGraphicSize(Std.int(weekCharacterThing.width * 0.5));
|
||||||
|
weekCharacterThing.updateHitbox();
|
||||||
|
}
|
||||||
|
|
||||||
|
grpWeekCharacters.add(weekCharacterThing);
|
||||||
|
}
|
||||||
|
|
||||||
difficultySelectors = new FlxGroup();
|
difficultySelectors = new FlxGroup();
|
||||||
add(difficultySelectors);
|
add(difficultySelectors);
|
||||||
|
|
||||||
@ -100,12 +123,15 @@ class StoryMenuState extends MusicBeatState
|
|||||||
difficultySelectors.add(rightArrow);
|
difficultySelectors.add(rightArrow);
|
||||||
|
|
||||||
add(yellowBG);
|
add(yellowBG);
|
||||||
|
add(grpWeekCharacters);
|
||||||
|
|
||||||
txtTracklist = new FlxText(FlxG.width * 0.05, yellowBG.x + yellowBG.height + 100, 0, "Tracks", 32);
|
txtTracklist = new FlxText(FlxG.width * 0.05, yellowBG.x + yellowBG.height + 100, 0, "Tracks", 32);
|
||||||
txtTracklist.alignment = CENTER;
|
txtTracklist.alignment = CENTER;
|
||||||
txtTracklist.font = rankText.font;
|
txtTracklist.font = rankText.font;
|
||||||
txtTracklist.color = 0xFFe55777;
|
txtTracklist.color = 0xFFe55777;
|
||||||
add(txtTracklist);
|
add(txtTracklist);
|
||||||
|
add(rankText);
|
||||||
|
add(scoreText);
|
||||||
|
|
||||||
updateText();
|
updateText();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user