Seperated tutorials
This commit is contained in:
parent
6cf7267078
commit
a3b99638af
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
@ -5,19 +5,18 @@
|
||||
<SubTexture name="EASY0000" x="0" y="0" width="196" height="65"/>
|
||||
<SubTexture name="HARD0000" x="206" y="0" width="211" height="67"/>
|
||||
<SubTexture name="NORMAL0000" x="427" y="0" width="308" height="67"/>
|
||||
<SubTexture name="WEEK10000" x="0" y="77" width="360" height="89"/>
|
||||
<SubTexture name="WEEK1 select0000" x="0" y="77" width="360" height="89"/>
|
||||
<SubTexture name="WEEK1 select0001" x="370" y="77" width="360" height="89"/>
|
||||
<SubTexture name="WEEK20000" x="0" y="279" width="361" height="87"/>
|
||||
<SubTexture name="arrow left0000" x="740" y="77" width="48" height="85"/>
|
||||
<SubTexture name="arrow push left0000" x="798" y="77" width="42" height="75"/>
|
||||
<SubTexture name="arrow push right0000" x="850" y="77" width="41" height="74"/>
|
||||
<SubTexture name="arrow right0000" x="901" y="77" width="47" height="85"/>
|
||||
<SubTexture name="lock0000" x="0" y="176" width="67" height="93"/>
|
||||
<SubTexture name="week 2 CANNOT select0000" x="77" y="176" width="361" height="87" frameX="-10" frameY="0" frameWidth="383" frameHeight="87"/>
|
||||
<SubTexture name="week 2 CANNOT select0001" x="448" y="176" width="361" height="87" frameX="0" frameY="0" frameWidth="383" frameHeight="87"/>
|
||||
<SubTexture name="week 2 CANNOT select0002" x="0" y="279" width="362" height="87" frameX="-21" frameY="0" frameWidth="383" frameHeight="87"/>
|
||||
<SubTexture name="week 2 CANNOT select0003" x="448" y="176" width="361" height="87" frameX="-7" frameY="0" frameWidth="383" frameHeight="87"/>
|
||||
<SubTexture name="week 2 CANNOT select0004" x="77" y="176" width="361" height="87" frameX="-11" frameY="0" frameWidth="383" frameHeight="87"/>
|
||||
<SubTexture name="week 2 CANNOT select0005" x="77" y="176" width="361" height="87" frameX="-11" frameY="0" frameWidth="383" frameHeight="87"/>
|
||||
<SubTexture name="week2 select0000" x="77" y="176" width="361" height="87" frameX="0" frameY="0" frameWidth="383" frameHeight="87"/>
|
||||
<SubTexture name="week2 select0001" x="372" y="279" width="361" height="87"/>
|
||||
<SubTexture name="tutorial0000" x="77" y="176" width="443" height="82"/>
|
||||
<SubTexture name="tutorial selected0000" x="77" y="176" width="443" height="82"/>
|
||||
<SubTexture name="tutorial selected0001" x="530" y="176" width="443" height="82"/>
|
||||
<SubTexture name="week2 select0000" x="0" y="279" width="361" height="87"/>
|
||||
<SubTexture name="week2 select0001" x="371" y="279" width="361" height="87"/>
|
||||
</TextureAtlas>
|
||||
|
@ -17,6 +17,7 @@ class FreeplayState extends MusicBeatState
|
||||
|
||||
var selector:FlxText;
|
||||
var curSelected:Int = 0;
|
||||
var curDifficulty:Int = 1;
|
||||
|
||||
var scoreText:FlxText;
|
||||
var lerpScore:Int = 0;
|
||||
@ -77,6 +78,7 @@ class FreeplayState extends MusicBeatState
|
||||
add(scoreText);
|
||||
|
||||
changeSelection();
|
||||
changeDiff();
|
||||
|
||||
// FlxG.sound.playMusic('assets/music/title' + TitleState.soundExt, 0);
|
||||
// FlxG.sound.music.fadeIn(2, 0, 0.8);
|
||||
@ -143,6 +145,16 @@ class FreeplayState extends MusicBeatState
|
||||
}
|
||||
}
|
||||
|
||||
function changeDiff(change:Int = 0)
|
||||
{
|
||||
curDifficulty += change;
|
||||
|
||||
if (curDifficulty < 0)
|
||||
curDifficulty = 2;
|
||||
if (curDifficulty > 2)
|
||||
curDifficulty = 0;
|
||||
}
|
||||
|
||||
function changeSelection(change:Int = 0)
|
||||
{
|
||||
NGio.logEvent('Fresh');
|
||||
|
@ -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)
|
||||
|
@ -16,12 +16,12 @@ class StoryMenuState extends MusicBeatState
|
||||
{
|
||||
var scoreText:FlxText;
|
||||
|
||||
var weekData:Array<Dynamic> = [['Tutorial', 'Bopeebo', 'Fresh', 'Dadbattle'], ['Spookeez', 'South']];
|
||||
var weekData:Array<Dynamic> = [['Tutorial'], ['Bopeebo', 'Fresh', 'Dadbattle'], ['Spookeez', 'South']];
|
||||
var curDifficulty:Int = 1;
|
||||
|
||||
public static var weekUnlocked:Array<Bool> = [true, false];
|
||||
public static var weekUnlocked:Array<Bool> = [true, true, false];
|
||||
|
||||
var weekCharacters:Array<Dynamic> = [['dad', 'bf', 'gf'], ['spooky', 'bf', 'gf']];
|
||||
var weekCharacters:Array<Dynamic> = [['dad', 'bf', 'gf'], ['dad', 'bf', 'gf'], ['spooky', 'bf', 'gf']];
|
||||
var curWeek:Int = 0;
|
||||
|
||||
var txtTracklist:FlxText;
|
||||
@ -68,12 +68,7 @@ class StoryMenuState extends MusicBeatState
|
||||
|
||||
for (i in 0...weekData.length)
|
||||
{
|
||||
var unlocked:Bool = true;
|
||||
|
||||
if (i == 1)
|
||||
unlocked = false;
|
||||
|
||||
var weekThing:MenuItem = new MenuItem(0, yellowBG.y + yellowBG.height + 10, i, unlocked);
|
||||
var weekThing:MenuItem = new MenuItem(0, yellowBG.y + yellowBG.height + 10, i);
|
||||
weekThing.y += ((weekThing.height + 20) * i);
|
||||
weekThing.targetY = i;
|
||||
grpWeekText.add(weekThing);
|
||||
@ -82,6 +77,7 @@ class StoryMenuState extends MusicBeatState
|
||||
weekThing.antialiasing = true;
|
||||
// weekThing.updateHitbox();
|
||||
|
||||
// Needs an offset thingie
|
||||
if (!weekUnlocked[i])
|
||||
{
|
||||
var lock:FlxSprite = new FlxSprite(weekThing.width + 10 + weekThing.x);
|
||||
@ -120,7 +116,7 @@ class StoryMenuState extends MusicBeatState
|
||||
difficultySelectors = new FlxGroup();
|
||||
add(difficultySelectors);
|
||||
|
||||
leftArrow = new FlxSprite(grpWeekText.members[0].x + 370, grpWeekText.members[0].y + 10);
|
||||
leftArrow = new FlxSprite(grpWeekText.members[0].x + grpWeekText.members[0].width + 10, grpWeekText.members[0].y + 10);
|
||||
leftArrow.frames = ui_tex;
|
||||
leftArrow.animation.addByPrefix('idle', "arrow left");
|
||||
leftArrow.animation.addByPrefix('press', "arrow push left");
|
||||
@ -303,7 +299,7 @@ class StoryMenuState extends MusicBeatState
|
||||
for (item in grpWeekText.members)
|
||||
{
|
||||
item.targetY = bullShit - curWeek;
|
||||
if (item.targetY == Std.int(0))
|
||||
if (item.targetY == Std.int(0) && weekUnlocked[curWeek])
|
||||
item.alpha = 1;
|
||||
else
|
||||
item.alpha = 0.6;
|
||||
|
@ -68,6 +68,9 @@ class TitleState extends MusicBeatState
|
||||
if (FlxG.save.data.weekUnlocked != null)
|
||||
{
|
||||
StoryMenuState.weekUnlocked = FlxG.save.data.weekUnlocked;
|
||||
|
||||
if (StoryMenuState.weekUnlocked.length < 3)
|
||||
StoryMenuState.weekUnlocked.insert(0, true);
|
||||
}
|
||||
|
||||
#if SKIP_TO_PLAYSTATE
|
||||
|
Loading…
x
Reference in New Issue
Block a user