Skip to content

Commit a8c14bf

Browse files
committed
better blazin' script
1 parent e6f463f commit a8c14bf

File tree

1 file changed

+4
-36
lines changed

1 file changed

+4
-36
lines changed

preload/scripts/songs/blazin.hxc

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,16 @@ class BlazinSong extends Song
1616
{
1717
super('blazin');
1818

19-
this.hasHidden = false;
2019
this.hasPlayedCutscene = false;
2120
}
2221

2322
function onCreate(event:ScriptEvent):Void
2423
{
2524
super.onCreate(event);
2625

27-
this.hasHidden = false;
2826
this.hasPlayedCutscene = false;
2927
}
3028

31-
function onDestroy(event:ScriptEvent):Void
32-
{
33-
super.onDestroy(event);
34-
35-
this.hasHidden = false;
36-
}
37-
38-
function onNoteHit(event:HitNoteScriptEvent):Void
39-
{
40-
super.onNoteHit(event);
41-
}
42-
4329
public function listDifficulties(variationId:String, variationIds:Array<String>, showLocked:Bool):Array<String>
4430
{
4531
if (showLocked || Save.instance.hasBeatenLevel('weekend1'))
@@ -51,31 +37,13 @@ class BlazinSong extends Song
5137
return [];
5238
}
5339

54-
var hasHidden = false;
5540
var hasPlayedCutscene:Bool = false;
5641

57-
function onUpdate(event:ScriptEvent):Void
42+
function onCountdownStart(event)
5843
{
59-
super.onUpdate(event);
60-
61-
if (!this.hasHidden)
62-
{
63-
this.hasHidden = true;
64-
hideOpponentStrumline();
65-
centerPlayerStrumline();
66-
}
67-
}
68-
69-
function hideOpponentStrumline()
70-
{
71-
var opponentStrumline:FlxSprite = PlayState.instance.opponentStrumline;
72-
if (opponentStrumline != null)
73-
{
74-
for (arrow in opponentStrumline.members)
75-
{
76-
arrow.visible = false;
77-
}
78-
}
44+
super.onCountdownStart(event);
45+
PlayState.instance.opponentStrumline.visible = false;
46+
centerPlayerStrumline();
7947
}
8048

8149
function centerPlayerStrumline()

0 commit comments

Comments
 (0)