hold notes and temp bg
This commit is contained in:
@ -19,10 +19,12 @@ class Note extends FlxSprite
|
||||
|
||||
public static var swagWidth:Float = 160 * 0.7;
|
||||
|
||||
public function new(strumTime:Float, noteData:Int)
|
||||
public function new(strumTime:Float, noteData:Int, prevNote:Note)
|
||||
{
|
||||
super();
|
||||
|
||||
this.prevNote = prevNote;
|
||||
|
||||
x += 50;
|
||||
this.strumTime = strumTime;
|
||||
|
||||
@ -35,6 +37,16 @@ class Note extends FlxSprite
|
||||
animation.addByPrefix('blueScroll', 'blue0');
|
||||
animation.addByPrefix('purpleScroll', 'purple0');
|
||||
|
||||
animation.addByPrefix('purpleholdend', 'pruple end hold');
|
||||
animation.addByPrefix('greenholdend', 'green hold end');
|
||||
animation.addByPrefix('redholdend', 'red hold end');
|
||||
animation.addByPrefix('blueholdend', 'blue hold end');
|
||||
|
||||
animation.addByPrefix('purplehold', 'purple hold piece');
|
||||
animation.addByPrefix('greenhold', 'green hold piece');
|
||||
animation.addByPrefix('redhold', 'red hold piece');
|
||||
animation.addByPrefix('bluehold', 'blue hold piece');
|
||||
|
||||
setGraphicSize(Std.int(width * 0.7));
|
||||
updateHitbox();
|
||||
antialiasing = true;
|
||||
@ -55,10 +67,49 @@ class Note extends FlxSprite
|
||||
animation.play('purpleScroll');
|
||||
}
|
||||
|
||||
if (noteData < 0)
|
||||
trace(prevNote);
|
||||
|
||||
if (noteData < 0 && prevNote != null)
|
||||
{
|
||||
noteScore * 0.2;
|
||||
alpha = 0.6;
|
||||
|
||||
x += width / 2;
|
||||
|
||||
switch (noteData)
|
||||
{
|
||||
case -1:
|
||||
animation.play('greenholdend');
|
||||
case -2:
|
||||
animation.play('redholdend');
|
||||
case -3:
|
||||
animation.play('blueholdend');
|
||||
case -4:
|
||||
animation.play('purpleholdend');
|
||||
}
|
||||
|
||||
updateHitbox();
|
||||
|
||||
x -= width / 2;
|
||||
|
||||
if (prevNote.noteData < 0)
|
||||
{
|
||||
switch (prevNote.noteData)
|
||||
{
|
||||
case -1:
|
||||
prevNote.animation.play('greenhold');
|
||||
case -2:
|
||||
prevNote.animation.play('redhold');
|
||||
case -3:
|
||||
prevNote.animation.play('bluehold');
|
||||
case -4:
|
||||
prevNote.animation.play('purplehold');
|
||||
}
|
||||
|
||||
prevNote.offset.y = -19;
|
||||
prevNote.scale.y *= 2.25;
|
||||
// prevNote.setGraphicSize();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user