story mode type shit

This commit is contained in:
Cameron Taylor
2020-10-30 18:55:09 -07:00
parent 15c0d4fbf6
commit f9b6c1461c
6 changed files with 184 additions and 97 deletions

View File

@@ -8,6 +8,7 @@ import flixel.math.FlxMath;
class MenuItem extends FlxSpriteGroup
{
public var targetY:Float = 0;
public var week:FlxSprite;
public function new(x:Float, y:Float, weekNum:Int = 0, unlocked:Bool = false)
{
@@ -15,13 +16,14 @@ class MenuItem extends FlxSpriteGroup
var tex = FlxAtlasFrames.fromSparrow(AssetPaths.campaign_menu_UI_assets__png, AssetPaths.campaign_menu_UI_assets__xml);
var week:FlxSprite = new FlxSprite();
week = new FlxSprite();
week.frames = tex;
week.animation.addByPrefix('week0', "WEEK1 select", 24);
week.animation.addByPrefix('week1', "week2 select", 24);
add(week);
week.animation.play('week' + weekNum);
week.animation.pause();
week.updateHitbox();
if (!unlocked)