Capped Zoom on Charter

Fixed missing misses on bf pixel
This commit is contained in:
NeeEoo
2023-05-30 02:33:00 +02:00
parent e9c9c2b04c
commit 77952782bb
2 changed files with 13 additions and 2 deletions
+5
View File
@@ -7,4 +7,9 @@
<anim name="singDOWN" anim="BF DOWN NOTE" fps="24" loop="false" x="0" y="0" />
<anim name="singUP" anim="BF UP NOTE" fps="24" loop="false" x="0" y="0" />
<anim name="singRIGHT" anim="BF RIGHT NOTE" fps="24" loop="false" x="0" y="0" />
<anim name="singUPmiss" anim="BF UP MISS" fps="24" loop="false" x="0" y="0"/>
<anim name="singLEFTmiss" anim="BF LEFT MISS" fps="24" loop="false" x="0" y="0"/>
<anim name="singRIGHTmiss" anim="BF RIGHT MISS" fps="24" loop="false" x="0" y="0"/>
<anim name="singDOWNmiss" anim="BF DOWN MISS" fps="24" loop="false" x="0" y="0"/>
</character>
+8 -2
View File
@@ -766,8 +766,14 @@ class Charter extends UIState {
}
}
var zoom:Float = 0;
var __camZoom:Float = 1;
var zoom(default, set):Float = 0;
var __camZoom(default, set):Float = 1;
function set_zoom(val:Float) {
return zoom = FlxMath.bound(val, -3.5, 1.75); // makes zooming not lag behind when continuing scrolling
}
function set___camZoom(val:Float) {
return __camZoom = FlxMath.bound(val, 0.1, 3);
}
// TOP MENU OPTIONS
#if REGION