@@ -311,7 +311,7 @@ class Note extends FlxSprite
|
||||
}
|
||||
|
||||
public function updateSustainClip() if (wasGoodHit && !noSustainClip) {
|
||||
var t = FlxMath.bound((Conductor.songPosition - strumTime) / height * 0.45 * lastScrollSpeed, 0, 1);
|
||||
var t = CoolUtil.bound((Conductor.songPosition - strumTime) / height * 0.45 * lastScrollSpeed, 0, 1);
|
||||
var rect = clipRect == null ? FlxRect.get() : clipRect;
|
||||
clipRect = rect.set(0, frameHeight * t, frameWidth, frameHeight * (1 - t));
|
||||
}
|
||||
|
||||
@@ -53,14 +53,11 @@ class NoteGroup extends FlxTypedGroup<Note> {
|
||||
public override function update(elapsed:Float) {
|
||||
i = length-1;
|
||||
__loopSprite = null;
|
||||
__time = __getSongPos();
|
||||
__time = __getSongPos() + limit;
|
||||
while(i >= 0) {
|
||||
__loopSprite = members[i--];
|
||||
if (__loopSprite == null || !__loopSprite.exists || !__loopSprite.active) {
|
||||
continue;
|
||||
}
|
||||
if (__loopSprite.strumTime - __time > limit)
|
||||
break;
|
||||
if (__loopSprite == null || !__loopSprite.exists || !__loopSprite.active) continue;
|
||||
if (__loopSprite.strumTime > __time) break;
|
||||
__loopSprite.update(elapsed);
|
||||
}
|
||||
}
|
||||
@@ -74,12 +71,11 @@ class NoteGroup extends FlxTypedGroup<Note> {
|
||||
|
||||
i = length-1;
|
||||
__loopSprite = null;
|
||||
__time = __getSongPos();
|
||||
__time = __getSongPos() + limit;
|
||||
while(i >= 0) {
|
||||
__loopSprite = members[i--];
|
||||
if (__loopSprite == null || !__loopSprite.exists || !__loopSprite.visible)
|
||||
continue;
|
||||
if (__loopSprite.strumTime - __time > limit) break;
|
||||
if (__loopSprite == null || !__loopSprite.exists || !__loopSprite.visible) continue;
|
||||
if (__loopSprite.strumTime > __time) break;
|
||||
__loopSprite.draw();
|
||||
}
|
||||
__currentlyLooping = oldCur;
|
||||
@@ -97,16 +93,15 @@ class NoteGroup extends FlxTypedGroup<Note> {
|
||||
public override function forEach(noteFunc:Note->Void, recursive:Bool = false) {
|
||||
i = length-1;
|
||||
__loopSprite = null;
|
||||
__time = __getSongPos();
|
||||
__time = __getSongPos() + limit;
|
||||
|
||||
var oldCur = __currentlyLooping;
|
||||
__currentlyLooping = true;
|
||||
|
||||
while(i >= 0) {
|
||||
__loopSprite = members[i--];
|
||||
if (__loopSprite == null || !__loopSprite.exists)
|
||||
continue;
|
||||
if (__loopSprite.strumTime - __time > limit) break;
|
||||
if (__loopSprite == null || !__loopSprite.exists) continue;
|
||||
if (__loopSprite.strumTime > __time) break;
|
||||
noteFunc(__loopSprite);
|
||||
}
|
||||
__currentlyLooping = oldCur;
|
||||
|
||||
Reference in New Issue
Block a user