-
activate()
-
Activates and tries to trigger to ensure that triggers chain.
- Source:
-
addAnim(name, settings)
-
Adds an animation to an entity.
- uses ig.AnimationExtended instead of the original ig.Animation
Parameters:
Name |
Type |
Argument |
Description |
name |
String
|
|
name of animation |
settings |
Object
|
<optional>
|
settings based on animation properties |
- Inherited From:
- Source:
- See:
-
-
addControl()
-
Adds control to entity.
Tip: this allows entity to call ig.GameExtended#updateChanges during update cycle.
- Inherited From:
- Source:
-
angleTo(from) → {Number}
-
Calculates angle from this entity to another entity or position.
Parameters:
Name |
Type |
Description |
from |
ig.EntityExtended
|
Vector2
|
Object
|
entity or position to find angle to. |
- Inherited From:
- Source:
Returns:
{
Number
}
angle
-
animOverride(animName, settings)
-
Plays an animation and sets animation as override until complete to ensure that no other animations play.
Parameters:
Name |
Type |
Argument |
Description |
animName |
String
|
|
name of animation to play. |
settings |
Object
|
<optional>
|
settings object. |
- Inherited From:
- Source:
Example
// settings is a plain object
settings = {};
// use an animation from another entity
settings.entity = otherEntity;
// don't auto release override
settings.lock = true;
// loop overriding animation
// also does not auto release override
settings.loop = true;
// play animation in reverse
settings.reverse = true;
// call a function when override completes
settings.callback = function () {...};
// call the callback in a context
settings.context = callbackContext;
-
animRelease(name, silent)
-
Removes animation override, see ig.EntityExtended.animOverride.
Parameters:
Name |
Type |
Argument |
Default |
Description |
name |
String
|
<optional>
|
any
|
specific name of overriding animation to release. If does not match will not release. |
silent |
Boolean
|
<optional>
|
false
|
whether to suppress callback. |
- Inherited From:
- Source:
-
applyAntiGravity()
-
Applies velocity to counteract gravity.
- Inherited From:
- Source:
-
applyAntiVelocity()
-
Zeroes out velocity.
- Inherited From:
- Source:
-
applyAntiVelocityX()
-
Zeroes out horizontal velocity.
- Inherited From:
- Source:
-
applyAntiVelocityY()
-
Zeroes out vertical velocity.
- Inherited From:
- Source:
-
castShadow(light, context, point, minX, minY, radius)
-
Fill context with the shadow cast by this entity from a point within a light, constrained by the given bounds.
Parameters:
Name |
Type |
Description |
light |
ig.EntityLight
|
to cast shadows from |
context |
CanvasRenderingContext2D
|
The canvas context onto which the shadows will be cast. |
point |
Object
|
point that represents where the light is coming from. |
minX |
Number
|
left position of light |
minY |
Number
|
top position of light |
radius |
Number
|
radius of light |
- Inherited From:
- Source:
-
-
Makes changes based on this entity's performance level.
- Inherited From:
- Source:
Returns:
{
Boolean
}
whether changed or not.
-
-
Called when performance changed to dynamic.
- Inherited From:
- Source:
-
-
Called when performance changed to movable.
- Inherited From:
- Source:
-
-
Called when performance changed to static.
- Inherited From:
- Source:
-
check()
-
Checks trigger against entity and tries to trigger.
- Source:
-
cleanup()
-
- Source:
-
cleanupCollision()
-
Cleans entity of previous collision properties just before new collision checks.
- Inherited From:
- Source:
-
cleanupPersistent()
-
Does cleanup on persistent changes to game made by this entity, ex: UI elements.
- Inherited From:
- Source:
-
collideWith(entity, dirX, dirY, nudge, vel, weak)
-
Collides with another entity along a specified axis.
Parameters:
Name |
Type |
Description |
entity |
ig.EntityExtended
|
entity colliding with. |
dirX |
Number
|
horizontal direction of colliding entity |
dirY |
Number
|
vertical direction of colliding entity |
nudge |
Number
|
nudge amount in direction |
vel |
Number
|
velocity in direction |
weak |
Boolean
|
weak colliding entity (i.e. only weak moves) |
- Inherited From:
- Source:
-
complete()
-
Called when finished triggering.
- Source:
-
createAnim(name, settings)
-
Generates and adds an animation from ig.EntityExtended#animSettings. If no settings passed, creates default idle animation.
Parameters:
Name |
Type |
Argument |
Description |
name |
Object
|
<optional>
|
name of animation. |
settings |
Object
|
<optional>
|
settings for animation. |
- Inherited From:
- Source:
- See:
-
-
deactivate()
-
Deactivates and tears down trigger.
- Source:
-
death(animNameDeath)
-
Shows death animation, automatically called when entity is first killed.
Tip: it is not recommended to call this method, but it is fine to override it!
Parameters:
Name |
Type |
Argument |
Default |
Description |
animNameDeath |
String
|
<optional>
|
"death" + direction
|
name of death animation to play |
- Inherited From:
- Source:
-
die()
-
Automatically called after entity finished being killed.
IMPORTANT: for full animated death, use ig.EntityExtended#kill instead.
- Inherited From:
- Source:
-
distanceEdgeTo(from) → {Number}
-
Calculates distance from edge of this entity to edge of another entity or position.
Parameters:
Name |
Type |
Description |
from |
ig.EntityExtended
|
Vector2
|
Object
|
entity or position to find distance to. |
- Inherited From:
- Source:
Returns:
{
Number
}
distance
-
distanceSquaredEdgeTo(from) → {Number}
-
Calculates distance squared from edge of this entity to edge of another entity or position.
- this is faster than distanceEdgeTo as it avoids sqrt, but the distance is squared
Parameters:
Name |
Type |
Description |
from |
ig.EntityExtended
|
Vector2
|
Object
|
entity or position to find distance to. |
- Inherited From:
- Source:
Returns:
{
Number
}
distance
-
distanceSquaredTo(from) → {Number}
-
Calculates distance squared from center of this entity (in world space) to center of another entity or position (in world space).
- this is faster than distanceTo as it avoids sqrt, but the distance is squared
Parameters:
Name |
Type |
Description |
from |
ig.EntityExtended
|
Vector2
|
Object
|
entity or position to find distance to. |
- Inherited From:
- Source:
Returns:
{
Number
}
distance squared
-
distanceTo(from) → {Number}
-
Calculates distance from center of this entity to center of another entity or position.
Parameters:
Name |
Type |
Description |
from |
ig.EntityExtended
|
Vector2
|
Object
|
entity or position to find distance to. |
- Inherited From:
- Source:
Returns:
{
Number
}
distance
-
draw()
-
Draws entity.
- Inherited From:
- Source:
-
fadeIn(settings) → {Tween}
-
Convenience function for tween fade to max alpha.
Parameters:
Name |
Type |
Argument |
Description |
settings |
Object
|
<optional>
|
settings for tween. |
- Inherited From:
- Source:
Returns:
{
Tween
}
tween object.
-
fadeOut(settings) → {Tween}
-
Convenience function for tween fade out.
Parameters:
Name |
Type |
Argument |
Description |
settings |
Object
|
<optional>
|
settings for tween. |
- Inherited From:
- Source:
Returns:
{
Tween
}
tween object.
-
fadeTo(alpha, settings) → {Tween}
-
Simple fade to specified alpha. Only tweens if not already at alpha, but onUpdate and onComplete methods are guaranteed to call at least once.
Parameters:
Name |
Type |
Argument |
Description |
alpha |
Number
|
|
alpha value between 0 and 1. |
settings |
Object
|
<optional>
|
settings for tween. |
- Inherited From:
- Source:
Returns:
{
Tween
}
tween object if tweening to alpha.
-
fadeToDeath(settings) → {Tween}
-
Convenience function for tween fade out and then kill.
Parameters:
Name |
Type |
Argument |
Description |
settings |
Object
|
<optional>
|
settings for tween. |
- Inherited From:
- Source:
Returns:
{
Tween
}
tween object.
-
getCanTrigger(entity) → {Boolean}
-
Gets whether trigger can be triggered.
Parameters:
Name |
Type |
Description |
entity |
ig.EntityExtended
|
entity trying to trigger this trigger. |
- Source:
Returns:
{
Boolean
}
whether trigger can be triggered.
-
getCenterX() → {Number}
-
Calculates entity's center x position.
- Inherited From:
- Source:
Returns:
{
Number
}
horizontal center.
-
getCenterY() → {Number}
-
Calculates entity's center x position.
- Inherited From:
- Source:
Returns:
{
Number
}
vertical center.
-
getDirectionalAnimName(animName) → {String}
-
Gets the directional name of an animation based on whether entity can flip and current facing.
IMPORTANT: this method is biased towards facing vertical.
Parameters:
Name |
Type |
Description |
animName |
String
|
base animation name |
- Inherited From:
- Source:
Returns:
{
String
}
directional animation name
Example
// if we begin with an animation named "move"
// and this entity can flip horizontally
var animName = entity.getAnimName( "move" );
// the result will be "moveX"
// while if the entity cannot flip horizontally
// but it is facing to the left
entity.facing.x = -1;
// the result will be "moveLeft"
-
getIsCollidingWithOneWay(entityOneWay) → {Boolean}
-
Approximate check of whether this entity is colliding with the one way blocking direction of another other entity.
- checks for whether the touching edges are within a certain range based on ig.CONFIG#PRECISION_PCT_ONE_SIDED
IMPORTANT: the non one way entity does this check to allow it to choose whether to ignore one way block.
Parameters:
Name |
Type |
Description |
entityOneWay |
ig.EntityExtended
|
one way entity to check against. |
- Inherited From:
- Source:
Returns:
{
Boolean
}
true if this entity is coming from other entity's one way blocking direction.
-
getIsMovingSelf() → {Boolean}
-
Calculates if entity is handling its own movement, i.e. dynamic, moving to, etc.
- Inherited From:
- Source:
Returns:
{
Boolean
}
if is handling own movement.
-
getIsVisible() → {Boolean}
-
Calculates if entity is visible in screen.
- instead of calling this, use ig.EntityExtended#visible
- Inherited From:
- Source:
Returns:
{
Boolean
}
if is in screen.
Example
// this is a bad idea
var visible = entity.getIsVisible();
// this is a good idea
var visible = entity.visible;
-
-
Gets entity layer based on ig.EntityExtended#layerName.
- Inherited From:
- Source:
Returns:
-
getNewVelocity(vel, accel, friction, max)
-
Calculates new velocity on a single axis for entity, and fixes bug of friction not limiting velocity.
Parameters:
Name |
Type |
Description |
vel |
Number
|
velocity |
accel |
Number
|
acceleration |
friction |
Number
|
friction |
max |
Number
|
max velocity |
- Inherited From:
- Source:
-
getOpaqueVertices() → {Array}
-
Calculates vertices for shadow casting just before first shadow is cast since changed.
- Inherited From:
- Source:
Returns:
{
Array
}
vertices for shadow casting
-
getPosDrawX() → {Number}
-
Calculates entity's draw x position, offset included.
- Inherited From:
- Source:
Returns:
{
Number
}
draw x position.
-
getPosDrawY() → {Number}
-
Calculates entity's draw y position, offset included.
- Inherited From:
- Source:
Returns:
{
Number
}
draw y position.
-
getSizeDrawX() → {Number}
-
Calculates horizontal size, offset included.
- Inherited From:
- Source:
Returns:
{
Number
}
total horizontal size.
-
getSizeDrawY() → {Number}
-
Calculates horizontal size, offset included.
- Inherited From:
- Source:
Returns:
{
Number
}
total vertical size.
-
getVertices() → {Array}
-
Calculates vertices based on entity's size.
- vertices are relative to entity, not world space, and are not scaled to window
- instead of calling this, use ig.EntityExtended#vertices
- Inherited From:
- Source:
Returns:
{
Array
}
vertices.
Example
// normally, vertices are never calculated
// but you can force vertices to be updated on change
entity.needsVertices = true;
// this is a bad idea
var vertices = entity.getVertices();
// this is a good idea
var vertices = entity.vertices;
-
getVerticesWorld() → {Array}
-
Calculates vertices in world space.
- verticesWorld are in world space and are not scaled to window
- instead of calling this, use ig.EntityExtended#verticesWorld
- Inherited From:
- Source:
Returns:
{
Array
}
vertices.
Example
// normally, vertices are never calculated
// but you can force vertices to be updated on change
entity.needsVertices = true;
// this is a bad idea
var verticesWorld = entity.getVerticesWorld();
// this is a good idea
var verticesWorld = entity.verticesWorld;
-
handleMovementTrace()
-
Enhanced handling of results of collision with collision map.
- Inherited From:
- Source:
Example
// generally, climbable tiles are IGNORED
// if we need them we should be using game's shapesPasses
myGame.shapesPasses = [
{
ignoreSolids: true,
ignoreOneWays: true
}
]
// this is because movement trace only catches collisions
// and it does not record the tile(s) this entity is within
// but the above shapes passes will extract climbable shapes
// and create entities of them, so we can know when
// one entity is within another entity that is climbable
-
handleTargets(entity, needsActivation)
-
Handles activating all self and targets in the target sequence.
Tip: override this method to change how the trigger and each target is activated.
Parameters:
Name |
Type |
Argument |
Default |
Description |
entity |
ig.EntityExtended
|
|
|
entity calling trigger. |
needsActivation |
Boolean
|
<optional>
|
true
|
whether to activating self in addition to targets |
- Source:
-
hide()
-
Sets ig.EntityExtended#hidden to true.
- Inherited From:
- Source:
-
init(x, y, settings)
-
Initializes entity.
- initializes types for checks, via ig.EntityExtended#initTypes
- initializes properties that are created at run-time, such as signals and timers, via ig.EntityExtended#initProperties
- resets entity, merges in new settings, and initializes animations via ig.EntityExtended#reset
Parameters:
Name |
Type |
Argument |
Description |
x |
Number
|
|
x position. |
y |
Number
|
|
y position. |
settings |
Object
|
<optional>
|
settings object. |
- Inherited From:
- Source:
-
initOpaqueVertices()
-
Initializes vertices for shadow casting.
- Inherited From:
- Source:
-
initProperties()
-
Initializes trigger properties.
- Source:
- See:
-
-
initTypes()
-
Initializes trigger types.
- adds ig.EntityExtended.TYPE.TRIGGER to {@link ig.EntityExtended#type}
- adds ig.EntityExtended.TYPE.PLAYER to {@link ig.EntityExtended#checkAgainst}
- Source:
-
intersectWith(entity)
-
Called when two entities intersect, regardless of collides and before checks or collisions.
Parameters:
- Inherited From:
- Source:
-
kill()
-
- Source:
-
lineOfSight(entity) → {Boolean}
-
Whether this entity can see another in a direct line of sight.
Parameters:
- Inherited From:
- Source:
Returns:
{
Boolean
}
if sees other.
-
link(entity, refresh)
-
Links entity to another entity, making original refresh after the entity it is linked to.
Tip: this allows for entity chaining and pseudo parent/child transforms.
Parameters:
Name |
Type |
Argument |
Default |
Description |
entity |
ig.EntityExtended
|
|
|
to link to. |
refresh |
Boolean
|
<optional>
|
true
|
whether to refresh after linking. |
- Inherited From:
- Source:
-
lookAt(target)
-
Flips entity to face a target entity or position.
Parameters:
- Inherited From:
- Source:
-
manageStart()
-
Called automatically by ig.GameExtended#PlayerManager when managing entity as if player were playing them.
- Inherited From:
- Source:
-
manageStop()
-
Called automatically by ig.GameExtended#PPlayerManager when done managing entity.
- Inherited From:
- Source:
-
moveAllStop()
-
Stops all movement immediately.
- Inherited From:
- Source:
-
moveTo(item, settings) → {Boolean}
-
Moves to an item, which can be an entity or a position.
Parameters:
Name |
Type |
Argument |
Description |
item |
ig.EntityExtended
|
Vector2
|
Object
|
|
entity with bounds or position with x and y properties. |
settings |
Object
|
<optional>
|
settings for move. |
- Inherited From:
- Source:
Returns:
{
Boolean
}
whether a new move to has been started
Example
// settings is a plain object
settings = {};
// to ensure entity follows other properly
settings.matchPerformance = true;
// to move to only once
settings.once = true;
// follow defaults to aligning at center of followed
// to follow at the top left instead of center
settings.align = { x: 0, y: 0 };
// to follow and flip with whatever we're moving to
settings.flipWith = true;
// to follow offset by 10 px
settings.offset = { x: 10, y: 10 };
// to follow above
settings.offsetPct = { x: 0, y: -1 };
// to follow at a random offset between -0.25 and 0.25 on both axes
settings.randomOffsetPct = { x: 0.25, y: 0.25 };
// a lerp between 0 and 1 will cause a smooth follow
settings.lerp = 0.1;
// a tweened follow with optional tween settings based on ig.EntityExtended#tween
settings.tween = true;
settings.tweenSettings = {...};
-
moveToComplete() → {Boolean}
-
Called when moved to complete.
- Inherited From:
- Source:
Returns:
{
Boolean
}
true when move is completed, otherwise is continuing sequence.
-
moveToPosition(item, settings)
-
Positions this entity relative to moving to item based on settings.
Parameters:
Name |
Type |
Argument |
Description |
item |
ig.EntityExtended
|
Vector2
|
Object
|
|
item to move to. |
settings |
Object
|
<optional>
|
settings object. |
- Inherited From:
- Source:
- See:
-
-
moveToSequenceNext()
-
Moves to next in current sequence of moving to entities.
- Inherited From:
- Source:
-
moveToStop()
-
Ends any moveTo in progress.
- Inherited From:
- Source:
-
moveToUpdate()
-
Updates any moveTo in progress.
- Inherited From:
- Source:
-
pause()
-
- Source:
-
projectShadow(point, radius, a, b, pointToA, pointToB, aToB) → {Array}
-
Projects an edge based on an point.
Parameters:
Name |
Type |
Description |
point |
Vector2
|
Object
|
2d point to project from. |
radius |
Number
|
|
a |
Object
|
edge vertex a. |
b |
Object
|
edge vertex b. |
pointToA |
Vector2
|
Object
|
2d vector from point to vertex a. |
pointToB |
Vector2
|
Object
|
2d vector from point to vertex b. |
aToB |
Object
|
2d vector from vertex a to vertex b. |
- Inherited From:
- Source:
Returns:
{
Array
}
vertices of the shape cast by light from edge.
-
ready()
-
Called automatically when entity added to game world.
- Inherited From:
- Source:
- See:
-
-
rebuild()
-
Rebuilds entity by updating all animations.
- Inherited From:
- Source:
-
receiveDamage(amount, from, unblockable) → {Boolean}
-
Does damage to entity while checking if invulnerable.
Parameters:
Name |
Type |
Argument |
Description |
amount |
Number
|
|
amount of damage. |
from |
ig.EntityExtended
|
<optional>
|
entity causing damage. |
unblockable |
Boolean
|
<optional>
|
whether damage cannot be blocked. |
- Inherited From:
- Source:
Returns:
{
Boolean
}
whether damage was applied.
-
recordChanges(force)
-
Records limited changes in transform and sets ig.EntityExtended#changed and ig.EntityExtended#moving.
- called automatically by ig.EntityExtended#update
Parameters:
Name |
Type |
Argument |
Description |
force |
Boolean
|
<optional>
|
forces changed. |
- Inherited From:
- Source:
-
recordLast()
-
Records last transform.
- called automatically by ig.EntityExtended#update
- Inherited From:
- Source:
-
recordResetState()
-
Records the state of an entity for later reset.
- does not record all properties for performance reasons
- Inherited From:
- Source:
-
refresh(force)
-
Refreshes entity size, position, etc when screen is resized or linked to is refreshed.
Tip: usually this is best applied to UI elements and not dynamic entities.
Parameters:
Name |
Type |
Argument |
Description |
force |
Boolean
|
<optional>
|
whether to force. |
- Inherited From:
- Source:
-
removeControl()
-
Removes control from entity.
Tip: this blocks entity from calling ig.GameExtended#updateChanges during update cycle.
- Inherited From:
- Source:
-
reposition(force)
-
Repositions entity.
Tip: by default, this method does nothing, so override this method with a class specific one.
Parameters:
Name |
Type |
Argument |
Description |
force |
Boolean
|
<optional>
|
whether to force. |
- Inherited From:
- Source:
-
reset(x, y, settings)
-
Resets an entity to last state.
Parameters:
Name |
Type |
Argument |
Description |
x |
Number
|
|
x position. |
y |
Number
|
|
y position. |
settings |
Object
|
<optional>
|
settings object. |
- Inherited From:
- Source:
-
resetCore(x, y, settings)
-
Resets settings and position of entity.
Parameters:
Name |
Type |
Argument |
Description |
x |
Number
|
|
x position. |
y |
Number
|
|
y position. |
settings |
Object
|
<optional>
|
settings object. |
- Inherited From:
- Source:
-
-
- Source:
-
resetToInitAnim()
-
Resets current anim to initial animation.
- Inherited From:
- Source:
-
resize(force)
-
Resizes entity.
Tip: by default, this method does nothing, so override this method with a class specific one.
Parameters:
Name |
Type |
Argument |
Description |
force |
Boolean
|
<optional>
|
whether to force. |
- Inherited From:
- Source:
-
setControllable(controllable)
-
Sets whether entity can control self.
Parameters:
Name |
Type |
Argument |
Default |
Description |
controllable |
Boolean
|
<optional>
|
true
|
|
- Inherited From:
- Source:
-
setGrounded(withoutVelocity)
-
Sets entity as grounded. Only changes gravity state if has gravity.
Parameters:
Name |
Type |
Argument |
Default |
Description |
withoutVelocity |
Boolean
|
<optional>
|
false
|
whether to leave velocity untouched |
- Inherited From:
- Source:
-
setHidden(hidden)
-
Sets ig.EntityExtended#hidden.
Parameters:
Name |
Type |
Argument |
Default |
Description |
hidden |
Boolean
|
<optional>
|
false
|
whether entity should be hidden. |
- Inherited From:
- Source:
-
-
Sets this entity's performance level.
- Inherited From:
- Source:
-
setUngrounded()
-
Sets entity as ungrounded.
- Inherited From:
- Source:
-
setup()
-
Sets up trigger and makes temporary modifications, which are removed by ig.EntityTrigger#teardown.
Tip: setup is called only on activate, while teardown is called on the 1) complete, 2) deactivate, and 3) cleanup methods. Complete is normally called immediately after activating/triggering, so if you don't want to teardown immediately use the ig.EntityTrigger#teardownWhenComplete property.
- Source:
-
spawn()
-
Called after ig.EntityExtended#ready when spawn animation is complete.
- sets ig.EntityExtended#currentAnim to ig.EntityExtended#animInit if present
- activates entity if ig.EntityExtended#activated is true
- Inherited From:
- Source:
-
teardown()
-
Tears down trigger and cleans up any temporary modifications trigger made by ig.EntityTrigger#setup.
Tip: setup is called only on activate, while teardown is called on the 1) complete, 2) deactivate, and 3) cleanup methods. Complete is normally called immediately after activating/triggering, so if you don't want to teardown immediately use the ig.EntityTrigger#teardownWhenComplete property.
- Source:
-
toggleActivate(entity)
-
Toggles between activate and deactivate.
Parameters:
Name |
Type |
Argument |
Description |
entity |
Entity
|
<optional>
|
causing deactivation. |
- Inherited From:
- Source:
-
touches(entity) → {Boolean}
-
Whether this entity touches another.
Parameters:
- Inherited From:
- Source:
Returns:
{
Boolean
}
if touches other.
-
trigger(entity, needsActivation, entityIsChecking)
-
Called when triggering to activate self and all targets.
Parameters:
Name |
Type |
Argument |
Default |
Description |
entity |
ig.EntityExtended
|
<optional>
|
|
entity calling trigger. |
needsActivation |
Boolean
|
<optional>
|
true
|
whether to activating self in addition to targets. |
entityIsChecking |
Boolean
|
<optional>
|
false
|
whether entity is checking. |
- Source:
-
tween(properties, settings) → {Tween}
-
Simple tween of specified properties.
IMPORTANT: make sure this entity has all tweening properties.
Parameters:
Name |
Type |
Argument |
Description |
properties |
Object
|
|
property values on entity. |
settings |
Object
|
<optional>
|
settings for tween, based on ig.TWEEN.tween. |
- Inherited From:
- Source:
Returns:
{
Tween
}
tween object.
-
tweenEnd(name)
-
Stops tweens on this entity.
IMPORTANT: if no specific tween name passed, will stop all tweens.
Parameters:
Name |
Type |
Argument |
Description |
name |
String
|
<optional>
|
name of specific tween. |
- Inherited From:
- Source:
-
unhide()
-
Sets ig.EntityExtended#hidden to false.
- Inherited From:
- Source:
-
unlink(refresh)
-
Unlinks entity from whatever it was linked to.
Parameters:
Name |
Type |
Argument |
Default |
Description |
refresh |
Boolean
|
<optional>
|
true
|
whether to refresh after unlinking. |
- Inherited From:
- Source:
-
unpause()
-
- Source:
-
update()
-
Updates trigger and checks whether should trigger after delay.
- Source:
-
updateBounds()
-
Updates bounds.
- called automatically by ig.EntityExtended#recordChanges when ig.EntityExtended#needsBounds
- Inherited From:
- Source:
-
updateChanges()
-
Changes entity.
- called automatically by ig.EntityExtended#update
Tip: use this method to handle moving, acting, etc, instead of the main update method.
- Inherited From:
- Source:
-
updateDynamics()
-
Updates dynamic properties such as velocity, gravity, collisions with collision map, etc.
- called automatically by ig.EntityExtended#update
IMPORTANT: if you change the way bounds are calculated you will also need to override the updateDynamics method!
- Inherited From:
- Source:
-
updateVelocity()
-
Updates velocity based on acceleration and friction.
- called automatically by ig.EntityExtended#updateDynamics
- Inherited From:
- Source:
-
updateVisible()
-
Called when visible to update animations.
- called automatically by ig.EntityExtended#update
- Inherited From:
- Source: