Implement code to load character offset file
This commit is contained in:
parent
460d072c78
commit
89c4140df9
@ -525,6 +525,17 @@ class Character extends FlxSprite
|
||||
}
|
||||
}
|
||||
|
||||
public function loadOffsetFile(character:String)
|
||||
{
|
||||
var offset:Array<String> = CoolUtil.coolTextFile(Paths.txt('images/characters/' + character + "Offsets"));
|
||||
|
||||
for (i in 0...offset.length)
|
||||
{
|
||||
var data:Array<String> = offset[i].split(' ');
|
||||
addOffset(data[0], Std.parseInt(data[1]), Std.parseInt(data[2]));
|
||||
}
|
||||
}
|
||||
|
||||
override function update(elapsed:Float)
|
||||
{
|
||||
if (!curCharacter.startsWith('bf'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user