fixed the dad bullshit
This commit is contained in:
@ -4,16 +4,11 @@ import flixel.FlxG;
|
||||
import flixel.FlxSprite;
|
||||
import flixel.graphics.frames.FlxAtlasFrames;
|
||||
|
||||
class Boyfriend extends FlxSprite
|
||||
class Boyfriend extends Character
|
||||
{
|
||||
public var animOffsets:Map<String, Array<Dynamic>>;
|
||||
|
||||
public var debugMode:Bool = false;
|
||||
|
||||
public function new(x:Float, y:Float)
|
||||
{
|
||||
super(x, y);
|
||||
animOffsets = new Map<String, Array<Dynamic>>();
|
||||
|
||||
var tex = FlxAtlasFrames.fromSparrow(AssetPaths.BOYFRIEND__png, AssetPaths.BOYFRIEND__xml);
|
||||
frames = tex;
|
||||
@ -37,20 +32,4 @@ class Boyfriend extends FlxSprite
|
||||
{
|
||||
super.update(elapsed);
|
||||
}
|
||||
|
||||
public function playAnim(AnimName:String, Force:Bool = false, Reversed:Bool = false, Frame:Int = 0):Void
|
||||
{
|
||||
animation.play(AnimName, Force, Reversed, Frame);
|
||||
|
||||
var daOffset = animOffsets.get(animation.curAnim.name);
|
||||
if (animOffsets.exists(animation.curAnim.name))
|
||||
{
|
||||
offset.set(daOffset[0], daOffset[1]);
|
||||
}
|
||||
}
|
||||
|
||||
public function addOffset(name:String, x:Float = 0, y:Float = 0)
|
||||
{
|
||||
animOffsets[name] = [x, y];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user