pixel note fixes for scale/mulitkey
This commit is contained in:
@@ -23,15 +23,17 @@ function onNoteCreation(event) {
|
||||
event.cancel();
|
||||
|
||||
var note = event.note;
|
||||
var strumID = event.strumID % 4;
|
||||
if (event.note.isSustainNote) {
|
||||
note.loadGraphic(Paths.image('stages/school/ui/arrowEnds'), true, 7, 6);
|
||||
note.animation.add("hold", [event.strumID]);
|
||||
note.animation.add("holdend", [4 + event.strumID]);
|
||||
note.animation.add("hold", [strumID]);
|
||||
note.animation.add("holdend", [4 + strumID]);
|
||||
} else {
|
||||
note.loadGraphic(Paths.image('stages/school/ui/arrows-pixels'), true, 17, 17);
|
||||
note.animation.add("scroll", [4 + event.strumID]);
|
||||
note.animation.add("scroll", [4 + strumID]);
|
||||
}
|
||||
note.scale.set(daPixelZoom, daPixelZoom);
|
||||
var strumScale = event.note.strumLine.strumScale;
|
||||
note.scale.set(daPixelZoom*strumScale, daPixelZoom*strumScale);
|
||||
note.updateHitbox();
|
||||
}
|
||||
|
||||
@@ -48,12 +50,14 @@ function onStrumCreation(event) {
|
||||
event.cancel();
|
||||
|
||||
var strum = event.strum;
|
||||
var strumID = event.strumID % 4;
|
||||
strum.loadGraphic(Paths.image('stages/school/ui/arrows-pixels'), true, 17, 17);
|
||||
strum.animation.add("static", [event.strumID]);
|
||||
strum.animation.add("pressed", [4 + event.strumID, 8 + event.strumID], 12, false);
|
||||
strum.animation.add("confirm", [12 + event.strumID, 16 + event.strumID], 24, false);
|
||||
strum.animation.add("static", [strumID]);
|
||||
strum.animation.add("pressed", [4 + strumID, 8 + strumID], 12, false);
|
||||
strum.animation.add("confirm", [12 + strumID, 16 + strumID], 24, false);
|
||||
|
||||
strum.scale.set(daPixelZoom, daPixelZoom);
|
||||
var strumScale = strumLines.members[event.player].strumScale;
|
||||
strum.scale.set(daPixelZoom*strumScale, daPixelZoom*strumScale);
|
||||
strum.updateHitbox();
|
||||
}
|
||||
|
||||
|
||||
@@ -98,12 +98,12 @@ class Strum extends FlxSprite {
|
||||
private inline function updateNotePos(daNote:Note) {
|
||||
if (daNote.strumRelativePos) {
|
||||
daNote.setPosition((this.width - daNote.width) / 2, (daNote.strumTime - Conductor.songPosition) * (0.45 * CoolUtil.quantize(getScrollSpeed(daNote), 100)));
|
||||
if (daNote.isSustainNote) daNote.y += N_WIDTHDIV2 * (scale.y / 0.7);
|
||||
if (daNote.isSustainNote) daNote.y += N_WIDTHDIV2 * (height / 112);
|
||||
} else {
|
||||
var offset = FlxPoint.get(0, (Conductor.songPosition - daNote.strumTime) * (0.45 * CoolUtil.quantize(getScrollSpeed(daNote), 100)));
|
||||
var realOffset = FlxPoint.get(0, 0);
|
||||
|
||||
if (daNote.isSustainNote) offset.y -= N_WIDTHDIV2 * (scale.y / 0.7);
|
||||
if (daNote.isSustainNote) offset.y -= N_WIDTHDIV2 * (height / 112);
|
||||
|
||||
if (Std.int(daNote.__noteAngle % 360) != 0) {
|
||||
var noteAngleCos = FlxMath.fastCos(daNote.__noteAngle / PIX180);
|
||||
|
||||
Reference in New Issue
Block a user