mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-04-05 19:54:24 -04:00
funny note tween on restart!
This commit is contained in:
parent
652a2c0ead
commit
1e70829799
2 changed files with 16 additions and 5 deletions
source
|
@ -19,6 +19,7 @@ class Note extends FlxSprite
|
|||
public var strumTime:Float = 0;
|
||||
|
||||
public var mustPress:Bool = false;
|
||||
public var followsTime:Bool = true; // used if you want the note to follow the time shit!
|
||||
public var noteData:Int = 0;
|
||||
public var canBeHit:Bool = false;
|
||||
public var tooLate:Bool = false;
|
||||
|
|
|
@ -1565,9 +1565,16 @@ class PlayState extends MusicBeatState
|
|||
|
||||
notes.forEach(function(nt)
|
||||
{
|
||||
nt.kill();
|
||||
notes.remove(nt, true);
|
||||
nt.destroy();
|
||||
nt.followsTime = false;
|
||||
FlxTween.tween(nt, {y: FlxG.height + nt.y}, 0.4, {
|
||||
ease: FlxEase.expoIn,
|
||||
onComplete: function(twn)
|
||||
{
|
||||
nt.kill();
|
||||
notes.remove(nt, true);
|
||||
nt.destroy();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var noteData:Array<SwagSection>;
|
||||
|
@ -2135,7 +2142,9 @@ class PlayState extends MusicBeatState
|
|||
}
|
||||
|
||||
var strumLineMid = strumLine.y + Note.swagWidth / 2;
|
||||
daNote.y = (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SongLoad.getSpeed(), 2));
|
||||
|
||||
if (daNote.followsTime)
|
||||
daNote.y = (Conductor.songPosition - daNote.strumTime) * (0.45 * FlxMath.roundDecimal(SongLoad.getSpeed(), 2));
|
||||
|
||||
if (PreferencesMenu.getPref('downscroll'))
|
||||
{
|
||||
|
@ -2156,7 +2165,8 @@ class PlayState extends MusicBeatState
|
|||
}
|
||||
else
|
||||
{
|
||||
daNote.y = strumLine.y - daNote.y;
|
||||
if (daNote.followsTime)
|
||||
daNote.y = strumLine.y - daNote.y;
|
||||
if (daNote.isSustainNote
|
||||
&& (!daNote.mustPress || (daNote.wasGoodHit || (daNote.prevNote.wasGoodHit && !daNote.canBeHit)))
|
||||
&& daNote.y + daNote.offset.y * daNote.scale.y <= strumLineMid)
|
||||
|
|
Loading…
Add table
Reference in a new issue