Added skew
This commit is contained in:
@@ -45,7 +45,7 @@ function beatHit(curBeat:Int) {
|
||||
function update(elapsed:Float) {
|
||||
if (Conductor.songPosition > 0)
|
||||
light.alpha = 1 - (FlxEase.cubeIn((curBeatFloat / 4) % 1) * 0.85);
|
||||
else
|
||||
else
|
||||
light.alpha = 0;
|
||||
|
||||
if (trainMoving) {
|
||||
|
||||
@@ -88,6 +88,8 @@ class Script extends FlxBasic implements IFlxDestroyable {
|
||||
#if sys "ZipUtil" => funkin.utils.ZipUtil, #end
|
||||
"MarkdownUtil" => funkin.utils.MarkdownUtil,
|
||||
"EngineUtil" => funkin.utils.EngineUtil,
|
||||
"MemoryUtil" => funkin.utils.MemoryUtil,
|
||||
"BitmapUtil" => funkin.utils.BitmapUtil,
|
||||
];
|
||||
}
|
||||
public static function getDefaultPreprocessors():Map<String, Dynamic> {
|
||||
@@ -102,7 +104,8 @@ class Script extends FlxBasic implements IFlxDestroyable {
|
||||
* All available script extensions
|
||||
*/
|
||||
public static var scriptExtensions:Array<String> = [
|
||||
"hx", "hscript", "hsc", "hxs", "lua" /** ACTUALLY NOT SUPPORTED, ONLY FOR THE MESSAGE **/
|
||||
"hx", "hscript", "hsc", "hxs",
|
||||
"lua" /** ACTUALLY NOT SUPPORTED, ONLY FOR THE MESSAGE **/
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,7 +25,7 @@ class FlxAnimate extends flxanimate.FlxAnimate {
|
||||
|
||||
getScreenPosition(_point, camera).subtractPoint(offset);
|
||||
rMatrix.translate(-origin.x, -origin.y);
|
||||
if (limb.name != "pivot") {
|
||||
if (!showPivot && limb.name != "pivot") {
|
||||
if (rotOffsetAngle != null && rotOffsetAngle != angle)
|
||||
{
|
||||
var angleOff = (-angle + rotOffsetAngle) * FlxAngle.TO_RAD;
|
||||
@@ -55,8 +55,8 @@ class FlxAnimate extends flxanimate.FlxAnimate {
|
||||
}
|
||||
else
|
||||
rMatrix.a = rMatrix.d = 0.7 / camera.zoom;
|
||||
|
||||
//rMatrix.concat(_skewMatrix);
|
||||
|
||||
rMatrix.concat(@:privateAccess flxanimate.FlxAnimate._skewMatrix);
|
||||
|
||||
_point.addPoint(origin);
|
||||
if (isPixelPerfectRender(camera))
|
||||
@@ -71,10 +71,11 @@ class FlxAnimate extends flxanimate.FlxAnimate {
|
||||
#end
|
||||
}
|
||||
|
||||
#if FLX_DEBUG
|
||||
if (FlxG.debugger.drawDebug)
|
||||
drawDebug();
|
||||
#end
|
||||
// doesnt work, needs to be remade
|
||||
// #if FLX_DEBUG
|
||||
// if (FlxG.debugger.drawDebug)
|
||||
// drawDebug();
|
||||
// #end
|
||||
}
|
||||
|
||||
override function limbOnScreen(limb:FlxFrame, m:FlxMatrix, ?Camera:FlxCamera)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package funkin.system;
|
||||
|
||||
import flixel.addons.effects.FlxSkewedSprite;
|
||||
import haxe.io.Path;
|
||||
import funkin.scripting.events.PlayAnimEvent.PlayAnimContext;
|
||||
import funkin.interfaces.IOffsetCompatible;
|
||||
@@ -25,7 +26,7 @@ abstract XMLAnimType(Int) {
|
||||
}
|
||||
}
|
||||
|
||||
class FunkinSprite extends FlxSprite implements IBeatReceiver implements IOffsetCompatible {
|
||||
class FunkinSprite extends FlxSkewedSprite implements IBeatReceiver implements IOffsetCompatible {
|
||||
public var spriteAnimType:XMLAnimType = NONE;
|
||||
public var beatAnims:Array<String> = [];
|
||||
public var name:String;
|
||||
@@ -49,6 +50,7 @@ class FunkinSprite extends FlxSprite implements IBeatReceiver implements IOffset
|
||||
spr.antialiasing = source.antialiasing;
|
||||
spr.scale.set(source.scale.x, source.scale.y);
|
||||
spr.scrollFactor.set(source.scrollFactor.x, source.scrollFactor.y);
|
||||
spr.skew.set(source.skew.x, source.skew.y);
|
||||
}
|
||||
return spr;
|
||||
}
|
||||
@@ -146,6 +148,7 @@ class FunkinSprite extends FlxSprite implements IBeatReceiver implements IOffset
|
||||
animateAtlas.flipY = flipY;
|
||||
animateAtlas.shader = shader;
|
||||
animateAtlas.antialiasing = antialiasing;
|
||||
animateAtlas.skew = skew;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user