Seperated tutorials

This commit is contained in:
Cameron Taylor
2020-11-06 02:21:29 -08:00
parent 6cf7267078
commit a3b99638af
7 changed files with 34 additions and 27 deletions

View File

@ -10,7 +10,7 @@ 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)
public function new(x:Float, y:Float, weekNum:Int = 0)
{
super(x, y);
@ -18,18 +18,15 @@ class MenuItem extends FlxSpriteGroup
week = new FlxSprite();
week.frames = tex;
week.animation.addByPrefix('week0', "WEEK1 select", 24);
week.animation.addByPrefix('week1', "week2 select", 24);
// TUTORIAL IS WEEK 0
week.animation.addByPrefix('week0', 'tutorial selected', 24);
week.animation.addByPrefix('week1', "WEEK1 select", 24);
week.animation.addByPrefix('week2', "week2 select", 24);
add(week);
week.animation.play('week' + weekNum);
week.animation.pause();
week.updateHitbox();
if (!unlocked)
{
week.alpha = 0.6;
}
}
override function update(elapsed:Float)