Instance Functions
addEventListener(type:Int, func:Listener, options?:EventListenerOptions):Void
Description
addFilter(filter:Filter):Void
Description
addShader(shader:Shader):Void
Description
addTimer(interval:Int, repeats:Int, func, options?:IntervalTimerOptions):Int
Description
attachToFloor(structure:Structure):Bool
Description
bringInFront(gameObject:GameObject):Void
Description
collisionTest(otherEntity:Entity, myBoxType:Int, theirBoxType:Int, bailEarly:Bool):Array<Rectangle>
Description
collisionTestGroup(sourceEntities:Array<Entity>, sourceBoxType:Int, otherEntity:Entity, targetBoxType:Int, bailEarly:Bool):Array<EntityCollisionResult>
Description
Takes in a group of entities, extracts their collision data, and then tests that collision data against another entity as if the collision data belonged to this entity:EntityApi The source entity whose collision data was responsible for the collision result:Rectangle A rectangle representing the overlapping space
faceLeft():Void
Description
faceRight():Void
Description
finalFramePlayed():Bool
Description
flip():Void
Description
flipX(value:Float):Float
Description
getAlpha():Float
Description
getAnimation():String
Description
getBottomLayer():Container
Description
getCollisionBoxes(boxType:Int):Array<CollisionBox>
Description
getCurrentFloor():Structure
Description
getCurrentFrame():Int
Description
getEcbCollisionBox():CollisionBox
Description
getEcbFootX():Float
Description
getEcbFootY():Float
Description
getEcbHeadX():Float
Description
getEcbHeadY():Float
Description
getEcbLeftHipX():Float
Description
getEcbLeftHipY():Float
Description
getEcbRightHipX():Float
Description
getEcbRightHipY():Float
Description
getKnockback():Float
Description
getNetSpeed():Float
Description
getNetXVelocity():Float
Description
getNetYVelocity():Float
Description
getPivotX():Float
Description
Returns the unscaled x-position of the entity's pivot point
getPivotXScaled():Float
Description
Returns the scaled x-position of the entity's pivot point
getPivotY():Float
Description
Returns the unscaled y-position of the entity's pivot point
getPivotYScaled():Float
Description
Returns the scaled y-position of the entity's pivot point
getPreviousState():Int
Description
getPreviousStateGroup():Int
Description
getResource():Resource
Description
getRotation():Float
Description
getScaleX():Float
Description
getScaleY():Float
Description
getState():Int
Description
getStaticBottomLayer():Container
Description
getStaticTopLayer():Container
Description
getTopLayer():Container
Description
getTotalFrames():Int
Description
getType():Int
Description
getUid():Int
Description
getViewRootContainer():Container
Description
getVisible():Bool
Description
getX():Float
Description
getXKnockback():Float
Description
getXSpeed():Float
Description
getXVelocity():Float
Description
getY():Float
Description
getYKnockback():Float
Description
getYSpeed():Float
Description
getYVelocity():Float
Description
hasAnimation(animation:String):Bool
Description
hasEventListener(type:Int, func?:Listener):Bool
Description
hitTestEntity(otherEntity:Entity, selfCollisionBoxType:Int, otherCollisionBoxType:Int, options?:HitTestEntityOptions):Array<CollisionResult>
Description
hitTestStructuresWithLineSegment(point1:Point, point2:Point, intersectionOut?:Point, options:StructureColliderSearchOptions):Array<Structure>
Description
inState(state:Int):Bool
Description
Checks if the entity is in the specified state. Parameters:
- state - The state to check for.
inStateGroup(stateGroup:Int):Bool
Description
Checks if the entity is in the specified state group. Parameters:
- stateGroup - The state group to check for.
isDisposed():Bool
Description
isFacingLeft():Bool
Description
isFacingRight():Bool
Description
isOnFloor():Bool
Description
kill():Void
Description
move(x:Float, y:Float):Void
Description
moveAbsolute(x:Float, y:Float):Void
Description
pause():Void
Description
playAnimation(name:String):Void
Description
playFrame(frame:Int):Void
Description
playFrameLabel(label:String):Void
Description
refreshEcb():Void
Description
removeEventListener(type:Int, func:Listener):Void
Description
removeFilter(filter:Filter):Void
Description
removeShader(shader:Shader):Void
Description
removeTimer(uid:Int):Bool
Description
resetMomentum():Void
Description
resetRotation():Void
Description
resume():Void
Description
sendBehind(gameObject:GameObject):Void
Description
setAlpha(value:Float):Float
Description
setKnockback(speed:Float, angle:Float):Float
Description
setRotation(value:Float):Float
Description
setScaleX(scaleX:Float):Float
Description
Sets the horizontal scale of the entity.
setScaleY(scaleY:Float):Float
Description
Sets the vertical scale of the entity.
setState(state:Int):Void
Description
Sets the state of the entity without changing the animation or inducing any other side effects. Parameters:
- state - The state to set the entity to.
setVisible(value:Bool):Bool
Description
setX(pos:Float):Float
Description
setXKnockback(speed:Float):Float
Description
setXSpeed(speed:Float):Float
Description
setXVelocity(speed:Float):Float
Description
setY(pos:Float):Float
Description
setYKnockback(speed:Float):Float
Description
setYSpeed(speed:Float):Float
Description
setYVelocity(speed:Float):Float
Description
swapDepths(gameObject:GameObject):Void
Description
toState(state:Int, animationOverride?:String):Void
Description
Transitions the entity to a new state, taking into account the object's state transition map and animation rules. Note that the the target state is not guaranteed to be the current state after this function is called, so it's important to check the state after calling this function if you need to know the result. Parameters:
- state - The state to transition to.
- animationOverride - Overrides the animation to use for the state transition.