Codename LogoCodename Logo

funkin.game.Character

APIWiki

Static variables

View in GitHub

@:value("bf")staticFALLBACK_CHARACTER:String = "bf"

View in GitHub

@:value("bf-dead")staticFALLBACK_DEAD_CHARACTER:String = "bf-dead"

View in GitHub

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

View in GitHub

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

Static methods

View in GitHub

staticgetIconFromCharName(?character:String):String

View in GitHub

@:value({ mods : false })staticgetList(mods:Bool = false):Array<String>

View in GitHub

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

Constructor

View in GitHub

@:value({ disableScripts : false, switchAnims : true, isPlayer : false, character : "bf" })new(x:Float, y:Float, character:String = "bf", isPlayer:Bool = false, switchAnims:Bool = true, disableScripts:Bool = false)

Variables

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

@:value("bf")curCharacter:String = "bf"

@:value(true)danceOnBeat:Bool = true

Whenever the character should dance on beat or not. Set to false for gf, since the dance animation is automatically handled by PlayState.

@:value(Character.FALLBACK_DEAD_CHARACTER)gameOverCharacter:String = Character.FALLBACK_DEAD_CHARACTER

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

@:value(4)holdTime:Float = 4

@:value(null)icon:String = null

@:value(null)iconColor:Null<FlxColor> = null

@:value("")idleSuffix:String = ""

@:value(false)isPlayer:Bool = false

@:value(Math.NEGATIVE_INFINITY)lastHit:Float = Math.NEGATIVE_INFINITY

@:value(false)playerOffsets:Bool = false

@:value(["singLEFT", "singDOWN", "singUP", "singRIGHT"])singAnims:Array<String> = ["singLEFT", "singDOWN", "singUP", "singRIGHT"]

@:value("bf")sprite:String = "bf"

@:value(false)stunned:Bool = false

xml:Access

Methods

View in GitHub

applyXML(xml:Access):Void

View in GitHub

inlinebuildCharacter(xml:Access):Void

View in GitHub

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

View in GitHub

@:value({ autoInterval : false, switchAnims : false })fixChar(switchAnims:Bool = false, autoInterval:Bool = false):Void

View in GitHub

inlinegetIcon():String

View in GitHub

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

Inherited Variables

Defined by FunkinSprite

@:value([])animDatas:Map<String, AnimData> = []

@:value(new Map&lt;String,FlxPoint&gt;())animOffsets:Map<String, FlxPoint> = new Map<String,FlxPoint>()

@:value([])beatAnims:Array<BeatAnim> = []

@:value(2)beatInterval:Int = 2

ODD interval -> asynced; EVEN interval -> synced

@:value(0)beatOffset:Int = 0

@:value(false)debugMode:Bool = false

@:value([])extra:Map<String, Dynamic> = []

@:value(1)initialZoom:Float = 1

@:value(DANCE)lastAnimContext:PlayAnimContext = DANCE

name:String

@:value(false)skipNegativeBeats:Bool = false

@:value(NONE)spriteAnimType:XMLAnimType = NONE

@:value(1)zoomFactor:Float = 1

Inherited Methods

Defined by FunkinSprite

View in GitHub

@:value({ y : 0, x : 0 })addOffset(name:String, x:Float = 0, y:Float = 0):Void

View in GitHub

inlinegetAnimOffset(name:String):Null<FlxPoint>

View in GitHub

inlinegetNameList():Array<String>

View in GitHub

inlinehasAnimation(AnimName:String):Bool

View in GitHub

@:value({ Key : null, Unique : false })loadSprite(path:String, Unique:Bool = false, ?Key:String):Void

View in GitHub

measureHit(curMeasure:Int):Void

View in GitHub

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

View in GitHub

inlineremoveAnimation(name:String):Void

View in GitHub

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