Codename LogoCodename Logo

funkin.game.Character

APIWikiTools

Static variables

View on GitHub

staticFALLBACK_CHARACTER:String = Flags.DEFAULT_CHARACTER

View on GitHub

staticFALLBACK_DEAD_CHARACTER:String = Flags.DEFAULT_GAMEOVER_CHARACTER

View on GitHub

staticcharacterAnimProperties:Array<String> = ["name", "anim", "x", "y", "fps", "loop", "indices"]

View on GitHub

staticcharacterProperties:Array<String> = ["x", "y", "sprite", "scale", "antialiasing", "flipX", "camx", "camy", "isPlayer", "icon", "color", "gameOverChar", "holdTime"]

Static methods

View on GitHub

staticgetIconFromCharName(?character:String, ?defaultIcon:String):String

View on GitHub

staticgetList(mods:Bool = false, includeFolders:Bool = false, folder:String = "data/characters/"):Array<String>

View on GitHub

staticgetXMLFromCharName(character:OneOfTwo<String, Character>):Access

Constructor

View on GitHub

new(x:Float, y:Float, ?character:String, isPlayer:Bool = false, switchAnims:Bool = true, disableScripts:Bool = false)

Variables

cameraOffset:FlxPoint = FlxPoint.get(0, 0)

curCharacter:String = Flags.DEFAULT_CHARACTER

danceOnBeat:Bool = true

Whenever the character should dance on beat or not.

extraOffset:FlxPoint = FlxPoint.get(0, 0)

gameOverCharacter:String = Character.FALLBACK_DEAD_CHARACTER

ghostDraw:Bool = false

globalOffset:FlxPoint = FlxPoint.get(0, 0)

holdTime:Float = 4

icon:String = null

iconColor:Null<FlxColor> = null

idleSuffix:String = ""

isPlayer:Bool = false

lastHit:Float = Math.NEGATIVE_INFINITY

playerOffsets:Bool = false

singAnims:Array<String> = ["singLEFT", "singDOWN", "singUP", "singRIGHT"]

sprite:String = Flags.DEFAULT_CHARACTER

stunned:Bool = false

xml:Access

Methods

View on GitHub

applyXML(xml:Access):Void

View on GitHub

inlinebuildCharacter(xml:Access):Void

View on GitHub

inlinebuildXML(?animsOrder:Array<String>):Xml

View on GitHub

fixChar(switchAnims:Bool = false, autoInterval:Bool = false):Void

View on GitHub

inlinegetIcon():String

View on GitHub

inlinegetSingAnim(direction:Int, suffix:String = ""):String

View on GitHub

playSingAnim(direction:Int, suffix:String = "", Context:PlayAnimContext = SING, ?Force:Bool, Reversed:Bool = false, Frame:Int = 0):Void

Like playSingAnimUnsafe but checks if the character has the animation with the suffix part, otherwise it plays the animation without the suffix part.

View on GitHub

playSingAnimUnsafe(direction:Int, suffix:String = "", Context:PlayAnimContext = SING, Force:Bool = true, Reversed:Bool = false, Frame:Int = 0):Void

Inherited Variables

Defined by FunkinSprite

animDatas:Map<String, AnimData> = []

animEnabled:Bool = true

animOffsets:Map<String, FlxPoint> = new Map<String,FlxPoint>()

beatAnims:Array<BeatAnim> = []

beatInterval:Int = 2

ODD interval -> not aligned to beats EVEN interval -> aligned to beats

beatOffset:Int = 0

debugMode:Bool = false

extra:Map<String, Dynamic> = []

name:String

skipNegativeBeats:Bool = false

zoomFactor:Float = 1

zoomFactorEnabled:Bool = true

Inherited Methods

Defined by FunkinSprite

View on GitHub

inlineaddAnim(name:String, prefix:String, frameRate:Float = 24, ?looped:Bool, ?forced:Bool, ?indices:Array<Int>, x:Float = 0, y:Float = 0, animType:XMLAnimType = NONE):ErrorCode

View on GitHub

addOffset(name:String, x:Float = 0, y:Float = 0):Void

View on GitHub

getAnim(name:String):OneOfTwo<FlxAnimation, FlxSymbolAnimation>

View on GitHub

inlinegetAnimOffset(name:String):Null<FlxPoint>

View on GitHub

inlinegetNameList():Array<String>

View on GitHub

inlinehasAnim(AnimName:String):Bool

View on GitHub

inlinehasAnimation(AnimName:String):Bool

View on GitHub

loadSprite(path:String, Unique:Bool = false, ?Key:String):FunkinSprite

View on GitHub

onPropertySet(property:String, value:Dynamic):Void

View on GitHub

inlineremoveAnim(name:String):Void

View on GitHub

inlineremoveAnimation(name:String):Void

View on GitHub

switchOffset(anim1:String, anim2:String):Void