Members
-
abilities :ig.Hierarchy
-
Abilities collection that character starts with.
- created on init- Inherited From:
- Source:
-
abilitiesOriginal :ig.Hierarchy
-
Reference to abilities collection that character starts with, ig.Character#abilities.
- references on init- Inherited From:
- Source:
-
activateCallback :function
-
Function called on activate.
- do not use this for predefined entity classes, override activate instead- Inherited From:
- Source:
-
activateContext :Object
-
Context to execute activate callback function in.
- do not use this for predefined entity classes, override activate instead- Inherited From:
- Source:
-
activated :Boolean
-
Whether entity's activate has been triggered,
- set to true to have an entity activate on init- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> added :Boolean
-
Whether entity has been added to game world.
- Inherited From:
- Default Value:
- false
- Source:
-
alpha :Number
-
Entity alpha. IMPORTANT: applied to animations automatically on draw.
- Inherited From:
- Default Value:
- 1
- Source:
-
alwaysToggleActivate :Boolean
-
Whether entity's activate should override deactivate.
- Inherited From:
- Default Value:
- false
- Source:
-
angle :Number
-
Angle of rotation in radians.
- Inherited From:
- Default Value:
- 0
- Source:
-
animationType :Number
-
Type of animation from ig.EntityExtended#animationTypes.
- used when creating animations from ig.EntityExtended#animSettings- Inherited From:
- Default Value:
- 0
- Source:
-
animationTypes :Array
-
Types of animation.
- used when creating animations from ig.EntityExtended#animSettings- Inherited From:
- Default Value:
- null
- Source:
-
animAutomatic :Boolean
-
Whether character is allowed to set own ig.EntityExtended#currentAnim automatically based on current state.
- Inherited From:
- Source:
- See:
-
animFrameTime :Number
-
Default frame time in seconds for animations when not defined in ig.EntityExtended#animSettings.
- used when creating animations from ig.EntityExtended#animSettings- Inherited From:
- Default Value:
- 1
- Source:
-
animInit :String
-
Name of animation to play when entity is ready and after spawned.
- Inherited From:
- Source:
-
animSequenceCount :Number
-
Default sequence frame count for animations when not defined in ig.EntityExtended#animSettings.
- used when creating animations from ig.EntityExtended#animSettings- Inherited From:
- Default Value:
- 1
- Source:
-
animSettings
-
- Source:
-
animsExpected :Array
-
List of names of animations this entity is expected to have. IMPORTANT: when any animation in this list is not present, it will be filled by a placeholder animation!
- Inherited From:
- Source:
-
animSheet
-
- Default Value:
- dummy.png
- Source:
-
animSheetHeight :Number
-
Tile height of dynamic animation sheet. IMPORTANT: use this for dynamically / run-time created entity types, not classes.
- Inherited From:
- Default Value:
- 0
- Source:
-
animSheetPath :String
-
Path to dynamic animation sheet.
- created on init
- automatically prepends shared base media directory from ig.CONFIG.PATH_TO_MEDIA IMPORTANT: use this for dynamically / run-time created entity types, not classes.- Inherited From:
- Source:
-
animSheetWidth :Number
-
Tile width of dynamic animation sheet. IMPORTANT: use this for dynamically / run-time created entity types, not classes.
- Inherited From:
- Default Value:
- 0
- Source:
-
animTileOffset :Number
-
Default tile offset, within animation sheet, to start animation when not defined in ig.EntityExtended#animSettings.
- used when creating animations from ig.EntityExtended#animSettings- Inherited From:
- Default Value:
- 0
- Source:
-
bounciness :Number
-
How bouncy entity is in collisions, between 0 and 1.
- Inherited From:
- Source:
- See:
-
canClimb :Boolean
-
Whether character is able to climb.
- Inherited From:
- Source:
-
canDieInstantly :Boolean
-
Whether entity can skip death animation if it dies while off screen.
- Inherited From:
- Default Value:
- true
- Source:
-
canFlipX :Boolean
-
Whether entity can flip animations vertically and set facing on x.
- Inherited From:
- Source:
-
canFlipY :Boolean
-
Whether entity can flip animations vertically and set facing on y.
- Inherited From:
- Source:
-
canJump :Boolean
-
Whether character is able to jump.
- Inherited From:
- Source:
-
canPathfind :Boolean
-
Whether character is able to pathfind.
- Inherited From:
- Source:
- See:
-
<readonly> changed :Boolean
-
Whether entity has changed since last update.
- Inherited From:
- Default Value:
- false
- Source:
-
checkAgainst :Bitflag|Number
-
Entities to check against, expanded for more flexibility and specificity. IMPORTANT: for an entity to avoid being ignored in checks, it must either collide, checkAgainst, or have a type!
- Inherited From:
- Default Value:
- none
- Source:
- See:
-
<readonly> checking :Boolean
-
Whether entity is checking against another entity matching ig.Entity#checkAgainst flag.
- Inherited From:
- Default Value:
- false
- Source:
-
climbable :Boolean
-
Whether entity is climbable.
- Inherited From:
- Default Value:
- false
- Source:
-
climbableStairs :Boolean
-
Whether entity is climbable as stairs. IMPORTANT: has no effect unless ig.EntityExtended#climbable is true.
- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> climbing :Boolean
-
Whether character is climbing.
- Inherited From:
- Default Value:
- false
- Source:
-
climbingControl :Number
-
Amount of acceleration control while climbing.
- Inherited From:
- Source:
- See:
// no control of direction while climbing character.climbingControl = 0; // full control of direction while climbing character.climbingControl = 1;
-
collides
-
- Source:
-
collidesChanges :Boolean
-
Whether an entity may change its ig.EntityExtended#collides property during gameplay. IMPORTANT: this forces an entity to be included in collision checks, even if it does not collide, checkAgainst, or have a type
- Inherited From:
- Default Value:
- false
- Source:
-
collidingWithEntitiesBelow :Boolean
-
Whether entity is colliding with one or more entities below.
- Inherited From:
- Default Value:
- false
- Source:
-
collidingWithMap :Boolean
-
Whether entity is colliding with a wall, floor, ceiling, etc in collision map.
- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> collisionMapResult :Object
-
Entity's result from colliding with ig.GameExtended#collisionMap.
- created on init- Inherited From:
- Source:
-
controllable :Boolean
-
Whether entity has control of itself and can move. IMPORTANT: uncontrollable entities update but do not move or change!
- Inherited From:
- Default Value:
- true
- Source:
-
<readonly> currentAnim :ig.AnimationExtended
-
Currently displaying animation.
- defers to ig.EntityExtended#overridingAnim- Inherited From:
- Default Value:
- null
- Source:
-
damageDelay :Number
-
Time in seconds between taking damage.
- automatically makes character invulnerable for delay length after taking damage- Inherited From:
- Default Value:
- 0
- Source:
-
damageSettings
-
- Default Value:
- gray particles
- Source:
-
damageTimer :ig.Timer
-
Timer for damage delay.
- created on init- Inherited From:
- Default Value:
- null
- Source:
-
deactivateCallback :function
-
Function called on deactivate.
- do not use this for predefined entity classes, override activate instead- Inherited From:
- Source:
-
deactivateContext :Object
-
Context to execute deactivate callback function in.
- do not use this for predefined entity classes, override activate instead- Inherited From:
- Source:
-
deathSettings
-
- Default Value:
- gray particles
- Source:
-
<readonly> dieing :Boolean
-
Whether entity is in the process of dieing.
- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> dieingSilently :Boolean
-
Whether entity is in the process of dieing without effects or animation.
- Inherited From:
- Default Value:
- false
- Source:
-
diffuse :Number
-
How much light is blocked when ig.EntityExtended#opaque.
- Inherited From:
- Source:
-
energy :Number
-
Energy statistic, by default used in abilities.
- Inherited From:
- Source:
- See:
-
energyMax :Number
-
Maximum energy statistic.
- Inherited From:
- Source:
- See:
-
explodingDamage :Boolean
-
Whether characters should have a particle explosion when damaged
- explosions are created through an ig.EntityExplosion- Inherited From:
- Source:
- See:
-
explodingDeath :Boolean
-
Characters should have a particle explosion when killed.
- explosions are created through an ig.EntityExplosion- Inherited From:
- Source:
- See:
-
facing :Vector2|Object
-
Facing direction of entity based on velocity and look at.
- Inherited From:
- Default Value:
- right
- Source:
-
<readonly> falling :Boolean
-
Whether character has not been grounded for a duration above ig.Character.ungroundedForAndFallingThreshold.
- Inherited From:
- Default Value:
- false
- Source:
-
fixed :Boolean
-
Whether is fixed in screen vs inside world space.
- this is particularly useful for UI elements IMPORTANT: fixed elements cannot have dynamic performance!- Inherited From:
- Default Value:
- false
- Source:
-
flip :Boolean
-
Whether entity is flipped. IMPORTANT: flip is now an object with x and y boolean values!
- Inherited From:
- Source:
-
friction :Vector2|Object
-
Friction of entity
- Inherited From:
- Source:
- See:
-
frictionGrounded :Vector2
-
Friction while on ground.
-
frictionUngrounded :Vector2
-
Friction while in air.
-
frozen :Boolean
-
Whether entity should skip updating.
- Inherited From:
- Default Value:
- false
- Source:
-
gravityFactor :Number
-
Percent of gravity to apply, between 0 and 1.
- Inherited From:
- Source:
- See:
-
grounded :Boolean
-
Whether entity is grounded.
- Inherited From:
- Source:
- See:
-
group :Bitflag|Number
-
Group of entities to avoid checking against and colliding with. Tip: as the group property is a bitflag, it can be any combination of groups!
- Inherited From:
- Default Value:
- none
- Source:
- See:
-
<readonly> hasGravity :Boolean
-
Whether entity has gravity.
- set automatically during update- Inherited From:
- Source:
-
health
-
- Inherited From:
- Source:
-
healthMax
-
- Inherited From:
- Source:
-
<readonly> hidden :Boolean
-
Whether entity is hidden and cannot be seen by other entities. Set via ig.EntityExtended#setHidden.
- Inherited From:
- Default Value:
- false
- Source:
-
highPerformance :Boolean
-
Whether entity is high performance, i.e. skips a lot of checks and adds/removals to increase speed at the loss of flexibility and functionality. IMPORTANT: high performance entities don't check, don't collide, and are not interactive!
- Inherited From:
- Default Value:
- false
- Source:
-
hollow :Boolean
-
Whether entity only casts shadows from edges when ig.EntityExtended#opaque.
- Inherited From:
- Default Value:
- true
- Source:
-
ignoreSystemScale :Boolean
-
Whether entity elements should ignore system scale.
- Inherited From:
- Default Value:
- ig.CONFIG.ENTITY.IGNORE_SYSTEM_SCALE
- Source:
-
<readonly> intersecting :Boolean
-
Whether entity is intersecting another entity.
- Inherited From:
- Default Value:
- false
- Source:
-
invulnerable :Boolean
-
Whether entity blocks all incoming damage.
- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> jumpAscend :Boolean
-
Whether character is in initial, ascending portion of jump.
- Inherited From:
- Default Value:
- false
- Source:
-
jumpControl :Number
-
Amount of acceleration control while in air.
- Inherited From:
- Source:
- See:
// no control of direction while in air character.jumpControl = 0; // full control of direction while in air character.jumpControl = 1;
-
jumpForce :Number
-
Speed modifier to apply on each jump step.
- Inherited From:
- Source:
- See:
// jump is slow and not very high character.jumpForce = 1; // jump is faster and higher character.jumpForce = 10;
-
<readonly> jumping :Boolean
-
Whether character is jumping.
- to check if character is not on ground, use ig.Character#grounded.- Inherited From:
- Default Value:
- false
- Source:
-
jumpSteps :Number
-
Number of update steps to apply jump force.
- Inherited From:
- Source:
- See:
// jump is short character.jumpSteps = 1; // jump is long character.jumpSteps = 10;
-
layerName :String
-
Layer to be added to upon instantiation.
- Inherited From:
- Default Value:
- entities
- Source:
-
linkedTo :ig.EntityExtended
-
Another entity that this entity is linked to.
- Inherited From:
- Default Value:
- null
- Source:
-
<readonly> managed :Boolean
-
Whether entity is currently being managed by ig.GameExtended#playerManager.
- Inherited From:
- Default Value:
- false
- Source:
-
maxVel :Vector2|Object
-
Max velocity of entity
- Inherited From:
- Source:
- See:
-
maxVelClimbing :Vector2
-
Max velocity while climbing.
- Inherited From:
- Source:
- See:
-
maxVelGrounded :Vector2
-
Max velocity while on ground.
- Inherited From:
- Source:
- See:
-
maxVelUngrounded :Vector2
-
Max velocity while in air.
-
mimicLevel :Number
-
How high of a mimic power is needed to mimic this character's abilities.
- Inherited From:
- Default Value:
- 0
- Source:
- See:
-
minBounceVelocity :Number
-
Minimum velocity to bounce.
- Inherited From:
- Source:
- See:
-
<readonly> movedTo :Boolean
-
Whether entity has moved to currently moving to entity.
- Inherited From:
- Default Value:
- true
- Source:
-
<readonly> moveToUnsafe :Boolean
-
Whether character tried to move but stopped because movement was unsafe. Tip: this is only set while pathfinding!
- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> moving :Boolean
-
Whether entity is moving.
- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> movingFrom :Boolean
-
Whether character is moving from another entity.
- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> movingTo :ig.EntityExtended|Vector2|Object
-
Whether entity is moving to another entity.
- Inherited From:
- Default Value:
- null
- Source:
-
<readonly> movingToOnce :Boolean
-
Whether entity should move to another entity and stop moving.
- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> movingToTweening :Boolean
-
Whether entity is tweening to another entity. IMPORTANT: this is automatically disabled with dynamic entities!
- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> movingToTweenPct :Number
-
Percent progress of tweening to another entity.
- Inherited From:
- Source:
-
<readonly> movingX :Boolean
-
Whether entity is moving horizontally.
- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> movingY :Boolean
-
Whether entity is moving vertically.
- Inherited From:
- Default Value:
- false
- Source:
-
needsNewPath :Boolean
-
Whether character needs new path for pathfinding.
- Inherited From:
- Default Value:
- false
- Source:
-
needsRebuild :Boolean
-
Whether entity needs to be rebuilt on next refresh. IMPORTANT: it is usually a bad idea to set this to false initially!
- Inherited From:
- Default Value:
- true
- Source:
-
needsVertices :Boolean
-
Whether to calculate vertices on change.
- Inherited From:
- Source:
- See:
-
offset :Vector2|Object
-
Character base offset.
- Inherited From:
- Source:
- See:
-
onAdded :ig.Signal
-
Signal dispatched when entity added to game.
- created on init.- Inherited From:
- Source:
-
oneWay :Boolean
-
Whether entity is one way
- Inherited From:
- Default Value:
- false
- Source:
-
oneWayFacing :Vector2
-
Direction from which entity will collide with another entity.
- Inherited From:
- Default Value:
- null
- Source:
// direction should be a 2d vector with a length of 1 // i.e. this is invalid entity.oneWayFacing = { x: 0, y: 0 }; // while either of the following is okay entity.oneWayFacing = { x: 1, y: 0 }; entity.oneWayFacing = ig.utilsvector2.vector( 1, 0 ); // to block from the left entity.oneWayFacing = { x: -1, y: 0 }; // to block from the right entity.oneWayFacing = { x: 1, y: 0 }; // to block from the top entity.oneWayFacing = { x: 0, y: -1 }; // to block from the bottom entity.oneWayFacing = { x: 0, y: 1 };
-
onMovedTo :ig.Signal
-
Signal dispatched when entity completes moving to another entity.
- created on init.- Inherited From:
- Source:
-
onRefreshed :ig.Signal
-
Signal dispatched when entity is refreshed.
- created on init.- Inherited From:
- Source:
-
onRemoved :ig.Signal
-
Signal dispatched when entity removed from game.
- created on init.- Inherited From:
- Source:
-
opaque :Boolean
-
Whether entity casts a shadow from lights.
- Inherited From:
- Source:
-
opaqueFromVertices :Boolean
-
Whether opaque vertices should use vertices when present. IMPORTANT: when true, this overrides ig.EntityExtended#initOpaqueVertices, and ig.EntityExtended#getOpaqueVertices.
- Inherited From:
- Source:
- See:
-
opaqueOffset
-
Dummy has slightly different shadow casting offsets.
- Source:
-
opaqueVertices :Array
-
List of vertices in world space for shadow casting.
- recalculated when casting shadows by ig.EntityExtended#getOpaqueVertices- Inherited From:
- Source:
-
<readonly> overridingAnim :ig.AnimationExtended
-
Currently overriding animation.
- if present, this displays instead of ig.EntityExtended#currentAnim- Inherited From:
- Default Value:
- null
- Source:
-
path :Array
-
Path for pathfinding.
- Inherited From:
- Source:
- See:
-
pathfindingDelay :Number
-
Delay in seconds between pathfinding.
- Inherited From:
- Source:
- See:
-
pathfindingSimpleDelay :Number
-
Delay in seconds between pathfinding when following a path.
- Inherited From:
- Source:
- See:
-
pathfindingUpdateDelay :Number
-
Delay in seconds between pathfinding when following a path.
- Inherited From:
- Source:
- See:
-
pathingTimer :ig.Timer
-
Pathing update timer.
- created on first pathfind- Inherited From:
- Source:
-
<readonly> paused :Boolean
-
Whether entity is paused.
- Inherited From:
- Default Value:
- false
- Source:
-
performance
-
Character performance should be movable.
- set to dynamic to take advantage of run, jump, and climb- Inherited From:
- Default Value:
- movable
- Source:
-
persistent :Boolean
-
Whether entity should remain across levels. Tip: an entity will only be moved from one level to another if an entity is found with a matching name! IMPORTANT: the game will keep the first of each uniquely named persistent entity it encounters and merge the editor position and settings of any others with the same name as it encounters them.
- Inherited From:
- Default Value:
- false
- Source:
-
pos :Vector2|Object
-
Base position.
- Inherited From:
- Source:
-
<readonly> posDraw :Vector2|Object
-
Drawn position.
- Inherited From:
- Source:
-
rangeInteractableX :Number
-
Horizontal range at which this entity can be interacted with.
- a range of 0 is considered infinite
- abilities compare this to their own range and use the higher of the two IMPORTANT: only relevant if entity type includes ig.EntityExtended.TYPE.INTERACTIVE.- Inherited From:
- Default Value:
- 0
- Source:
-
rangeInteractableY :Number
-
Vertical range at which this entity can be interacted with.
- a range of 0 is considered infinite
- abilities compare this to their own range and use the higher of the two IMPORTANT: only relevant if entity type includes ig.EntityExtended.TYPE.INTERACTIVE.- Inherited From:
- Default Value:
- 0
- Source:
-
regen :Boolean
-
Whether character regenerates stats.
- Inherited From:
- Default Value:
- false
- Source:
-
regenAsPctEnergy :Boolean
-
Whether to treat energy regen as a percentage of max.
- Inherited From:
- Default Value:
- false
- Source:
-
regenAsPctHealth :Boolean
-
Whether to treat health regen as a percentage of max.
- Inherited From:
- Default Value:
- false
- Source:
-
regenDelay :Number
-
Time in seconds between regeneration ticks.
- Inherited From:
- Default Value:
- 0
- Source:
-
regenEnergy :Boolean
-
Whether character can regenerate the energy statistic.
- use to block regeneration dynamically- Inherited From:
- Default Value:
- true
- Source:
-
regenHealth :Boolean
-
Whether character can regenerate the health statistic.
- use to block regeneration dynamically- Inherited From:
- Default Value:
- true
- Source:
-
regenRateEnergy :Number
-
Amount of energy to regenerate per tick.
- Inherited From:
- Source:
- See:
-
regenRateHealth :Number
-
Amount of health to regenerate per tick.
- Inherited From:
- Source:
- See:
-
regenTimer :ig.Timer
-
Timer for regeneration ticks.
- created on init- Inherited From:
- Default Value:
- null
- Source:
-
resetState :Object
-
Last recorded state taken during ig.EntityExtended#recordResetState.
- automatically updated first time entity added to game world
- reset state records only a limited set of properties
- this can be useful for checkpoints, respawning, etc- Inherited From:
- Source:
-
scale :Number
-
Scale that overrides system scale when ig.EntityExtended#ignoreSystemScale is true.
- Inherited From:
- Default Value:
- ig.CONFIG.ENTITY.SCALE
- Source:
-
scaleMax :Number
-
Maximum value of ig.EntityExtended#scale.
- Inherited From:
- Default Value:
- ig.CONFIG.ENTITY.SCALE_MAX
- Source:
-
scaleMin :Number
-
Minimum value of ig.EntityExtended#scale.
- Inherited From:
- Default Value:
- ig.CONFIG.ENTITY.SCALE_MIN
- Source:
-
<readonly> scaleMod :Number
-
Modifier for when ig.EntityExtended#scale != ig.system.scale.
- Inherited From:
- Default Value:
- 1
- Source:
-
scaleOfSystemScale :Number
-
Scale of system scale.
- Inherited From:
- Default Value:
- ig.CONFIG.ENTITY.SCALE_OF_SYSTEM_SCALE
- Source:
-
size :Vector2|Object
-
Character base size should be effective size accounting for offset.
- Inherited From:
- Source:
- See:
-
- ig.CONFIG.CHARACTER.SIZE_EFFECTIVE_X
- ig.CONFIG.CHARACTER.SIZE_EFFECTIVE_Y
-
<readonly> sizeDraw :Vector2|Object
-
Drawn size of entity, including size, offsets, etc.
- Inherited From:
- Source:
-
slope :Object
-
Whether entity is on a slope, and if so, slope properties.
- Inherited From:
- Source:
-
slopeSpeedMod :Number
-
Speed multiplier on slopes
- Inherited From:
- Source:
- See:
-
slopeStanding :Vector2
-
Slope angle range that entity can stand on.
- Inherited From:
- Source:
- See:
-
slopeSticking
-
- Inherited From:
- Source:
- See:
-
- ig.CONFIG.CHARACTER.SLOPE_STICKING
-
speed :Vector2
-
Movement speed to be applied to acceleration.
- Inherited From:
- Source:
- See:
-
standing :Boolean
-
Whether entity is standing.
- Inherited From:
- Source:
- See:
-
<readonly> stuck :Boolean
-
Whether character thinks it may be stuck while following a path.
- Inherited From:
- Default Value:
- false
- Source:
-
stuckDelay :Number
-
Delay in seconds, after first becoming stuck, when character will throw path away.
- Inherited From:
- Source:
- See:
-
stuckTimer :ig.Timer
-
Stuck delay timer.
- created on first pathfind- Inherited From:
- Source:
-
targetable
-
- Inherited From:
- Default Value:
- true
- Source:
-
temporaryInvulnerabilityAlpha :Number
-
Temporary invulnerability pulse alpha.
- Inherited From:
- Default Value:
- 0.5
- Source:
-
temporaryInvulnerabilityPulses :Number
-
Number of times to pulse alpha while temporarily invulnerable.
- Inherited From:
- Default Value:
- 2
- Source:
-
textured :Boolean
-
Whether animations should be automatically textured across entity when added to entity.
- textures can be animated, but be careful about adding high amounts of frames Tip: this is best applied to resizable entities.- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> tweens :Object
-
All tweens affecting this entity that were initiated by ig.EntityExtended#tween.
- these tweens are automatically deleted when complete- Inherited From:
- Source:
-
type :Bitflag|Number
-
Entity type, expanded for more flexibility and specificity. IMPORTANT: for an entity to avoid being ignored in checks, it must either collide, checkAgainst, or have a type!
- Inherited From:
- Default Value:
- none
- Source:
- See:
-
<readonly> ungroundedFor :Number
-
Duration since character was grounded.
- Inherited From:
- Default Value:
- 0
- Source:
-
ungroundedForAndFallingThreshold :Number
-
Duration after character leaves ground to start playing fall animation.
- Inherited From:
- Source:
- See:
-
ungroundedForThreshold :Number
-
Duration after character leaves ground during which they can still jump.
- this is intended to help players with slower reaction time
- this does not allow another jump while jumping- Inherited From:
- Source:
- See:
-
vertices :Array
-
List of vertices based on bounds, relative to entity.
- not calculated by default for performance reasons
- to manually enable, use ig.EntityExtended#needsVertices- Inherited From:
- Source:
-
verticesWorld :Array
-
List of vertices based on bounds, relative to world space.
- not calculated by default for performance reasons
- to manually enable, use ig.EntityExtended#needsVertices- Inherited From:
- Source:
-
<readonly> visible :Boolean
-
Whether entity is visible in screen.
- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> wasChecking :Boolean
-
Whether entity was checking against another entity matching ig.Entity#checkAgainst flag.
- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> withinClimbables :Boolean
-
Whether character is intersecting a climbable entity.
- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> withinClimbablesAbove :Boolean
-
Whether character is intersecting a climbable entity above its feet (i.e. inside body).
- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> withinOneWay :Boolean
-
Whether character is intersecting a one-way entity.
- Inherited From:
- Default Value:
- false
- Source:
-
<readonly> withinStairs :Boolean
-
Whether character is intersecting a climbable stairs entity.
- Inherited From:
- Default Value:
- false
- Source:
Methods
-
activate(entity)
-
Do some activated behavior.
Parameters:Name Type Argument Description entity
Entity <optional>
causing activation. - Inherited From:
- Source:
-
addAnim(name, settings)
-
Adds an animation to an entity.
Parameters:
- uses ig.AnimationExtended instead of the original ig.AnimationName 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:
{ 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:
// 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:
-
changePerformance() → {Boolean}
-
Makes changes based on this entity's performance level.
- Inherited From:
- Source:
{ Boolean } whether changed or not. -
changePerformanceDynamic()
-
Called when performance changed to dynamic.
- Inherited From:
- Source:
-
changePerformanceMovable()
-
Called when performance changed to movable.
- Inherited From:
- Source:
-
changePerformanceStatic()
-
Called when performance changed to static.
- Inherited From:
- Source:
-
check(entity)
-
Checks this entity against another entity that matches this entity's ig.EntityExtended#type.
Parameters:Name Type Argument Description entity
ig.EntityExtended <optional>
other entity. - Inherited From:
- Source:
- See:
-
- ig.Entity.
-
cleanup()
-
- Inherited From:
- Source:
-
cleanupCollision()
-
- Inherited From:
- Source:
-
cleanupPersistent()
-
Does cleanup on persistent changes to game made by this entity, ex: UI elements.
- Inherited From:
- Source:
-
clearPath()
-
Clears path.
- Inherited From:
- Source:
-
climb()
-
Attempts to start climbing.
- Inherited From:
- Source:
-
climbDown()
-
Attempts to start climbing and climb down.
- Inherited From:
- Source:
-
climbEnd()
-
Stops climb in progress.
- Inherited From:
- Source:
-
climbUp()
-
Attempts to start climbing and climb up.
- Inherited From:
- Source:
-
climbUpdate()
-
Updates climb in progress.
- Inherited From:
- Source:
-
collideWith()
-
Collides with another entity.
- sets grounded if other entity is ig.EntityExtended.COLLIDES.ACTIVE or {@link ig.EntityExtended.COLLIDES.FIXED}
- updates visible and animation if collision caused character to stop moving- Inherited From:
- 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(entity)
-
Do some deactivated behavior.
Parameters:Name Type Argument Description entity
Entity <optional>
causing deactivation. - Inherited From:
- 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 when character finished being killed.
- removes invulnerability
- explodes if has ig.Character#explodingDeath and not ig.EntityExtended#dieingSilently- 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:
{ Number } distance -
distanceSquaredEdgeTo(from) → {Number}
-
Calculates distance squared from edge of this entity to edge of another entity or position.
Parameters:
- this is faster than distanceEdgeTo as it avoids sqrt, but the distance is squaredName Type Description from
ig.EntityExtended | Vector2 | Object entity or position to find distance to. - Inherited From:
- Source:
{ 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).
Parameters:
- this is faster than distanceTo as it avoids sqrt, but the distance is squaredName Type Description from
ig.EntityExtended | Vector2 | Object entity or position to find distance to. - Inherited From:
- Source:
{ 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:
{ Number } distance -
drainEnergy(amount, from, unblockable) → {Boolean}
-
Drain energy amount.
Parameters:Name Type Argument Description amount
Number amount of energy. from
ig.EntityExtended <optional>
entity source. unblockable
Boolean <optional>
whether drain is unblockable. - Inherited From:
- Source:
{ Boolean } whether applied. -
draw()
-
Draws entity.
- Inherited From:
- Source:
-
explode(settings)
-
Creates particle explosion.
Parameters:Name Type Argument Description settings
Object <optional>
settings object for an ig.EntityExplosion. - 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:
{ 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:
{ 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:
{ 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:
{ Tween } tween object. -
findMoveToPath(settings)
-
Gets and processes a path from this character to an entity.
Parameters:Name Type Argument Description settings
Object <optional>
settings for finding path - Inherited From:
- Source:
- See:
-
getCenterX() → {Number}
-
Calculates entity's center x position.
- Inherited From:
- Source:
{ Number } horizontal center. -
getCenterY() → {Number}
-
Calculates entity's center x position.
- Inherited From:
- Source:
{ 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:
{ String } directional animation nameExample// 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()
-
Checks if character is colliding with a one-way climbable entity.
- Inherited From:
- Source:
-
getIsMovingSelf() → {Boolean}
-
Calculates if entity is handling its own movement, i.e. dynamic, moving to, etc.
- Inherited From:
- Source:
{ 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:
{ Boolean } if is in screen.Example// this is a bad idea var visible = entity.getIsVisible(); // this is a good idea var visible = entity.visible;
-
getLayer() → {ig.Layer}
-
Gets entity layer based on ig.EntityExtended#layerName.
- Inherited From:
- Source:
{ ig.Layer } layer this entity is on. -
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:
{ Array } vertices for shadow casting -
getPosDrawX() → {Number}
-
Calculates entity's draw x position, offset included.
- Inherited From:
- Source:
{ Number } draw x position. -
getPosDrawY() → {Number}
-
Calculates entity's draw y position, offset included.
- Inherited From:
- Source:
{ Number } draw y position. -
getSizeDrawX() → {Number}
-
Calculates horizontal size, offset included.
- Inherited From:
- Source:
{ Number } total horizontal size. -
getSizeDrawY() → {Number}
-
Calculates horizontal size, offset included.
- Inherited From:
- Source:
{ 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:
{ 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:
{ 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:
// 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
-
hide()
-
Sets ig.EntityExtended#hidden to true.
- Inherited From:
- Source:
-
init(x, y, settings)
-
Initializes entity.
Parameters:
- 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#resetName 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 character properties.
- creates timers for things such as regen and damage delay
- creates ability collection- Inherited From:
- Source:
-
initTypes()
-
Initializes dummy types.
- adds ig.EntityExtended.TYPE.DAMAGEABLE to ig.EntityExtended#type- Source:
-
intersectWith()
-
Intersects and checks intersected for various properties such as one-way and climbable.
- Inherited From:
- Source:
-
jump()
-
Attempts to start jumping.
- Inherited From:
- Source:
-
jumpEnd()
-
Stops any jump in progress.
- Inherited From:
- Source:
-
jumpPush()
-
Does jump push for number of jump steps.
- Inherited From:
- Source:
-
jumpUpdate()
-
Updates jump in progress.
- Inherited From:
- Source:
-
kill()
-
Kills character.
- Inherited From:
- Source:
-
lineOfSight(entity) → {Boolean}
-
Whether this entity can see another in a direct line of sight.
Parameters:Name Type Description entity
ig.EntityExtended entity to check against. - Inherited From:
- Source:
{ 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:Name Type Description target
ig.EntityExtended | Vector2 | Object target to look at. - Inherited From:
- Source:
-
manageStart()
-
Characters stop moving to and pathfinding when managed.
- 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:
-
moveFrom(entity, settings) → {Boolean}
-
Moves character away from entity or position instead of towards.
Parameters:
- this method hooks into the moveTo method and adds some extra propertiesName Type Argument Description entity
ig.EntityExtended entity to move away from settings
Object <optional>
settings object - Inherited From:
- Source:
- See:
{ Boolean } whether a new move from has been started -
moveTo()
-
Move to an entity or position using pathfinding when dynamic or the original method when not.
- Inherited From:
- Source:
// if a character's performance is DYNAMIC myCharacter.performance = ig.EntityExtended.PERFORMANCE.DYNAMIC; // and the character can pathfind myCharacter.canPathfind = true; // this method will use pathfinding // and not the original method // which also means the settings change // settings is still a plain object settings = {}; // we can only search for paths // that keep us within range of our target // this also helps improve performance settings.searchDistance = 100; // if not doing simple pathfinding // we can avoid other entities settings.avoidEntities = true; // but sometimes, all we care about is not going off an edge into the air // so if we never want to fall off the edge of a platform settings.avoidUngrounded = true; // to do simple pathfinding // or move towards target 1 node at a time // this has much better performance // but it is far less accurate and cannot avoid obstacles // i.e. it is stupid (sometimes) settings.simple = true; // normally a character will do its best to treat slopes as safe // but if you want to force it to avoid walking on slopes // (note this only works on simple pathfinding) settings.avoidSlopes = true; // a character can often figure out // when the next node in the path is not safe // ex: a climbing area when the character cannot climb // if we don't care and want to try to follow the path anyway // (note this only works on simple pathfinding) settings.unsafe = true; // in most cases, the first node in the path is removed // which fixes many silly pathfinding behaviors // but if you want to keep it settings.alwaysKeepFirst = true;
-
moveToComplete()
-
- Inherited From:
- Source:
-
moveToDown(mod)
-
Accelerates character down at ig.Character#speed.
Parameters:Name Type Argument Description mod
Number <optional>
modifier to apply to speed. - Inherited From:
- Source:
-
moveToHere()
-
Zeroes all current acceleration and clears path.
- Inherited From:
- Source:
-
moveToHereHorizontal()
-
Zeroes current horizontal acceleration.
- Inherited From:
- Source:
-
moveToHereVertical()
-
Zeroes current vertical acceleration.
- Inherited From:
- Source:
-
moveToLeft(mod)
-
Accelerates character left at ig.Character#speed.
Parameters:Name Type Argument Description mod
Number <optional>
modifier to apply to speed. - Inherited From:
- Source:
-
moveToPath(path, settings)
-
Moves a character along a path.
Parameters:Name Type Argument Default Description path
Array <optional>
this.path list of points to move to. settings
Object settings for moving along path - Inherited From:
- Source:
- See:
-
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:
-
moveToRight(mod)
-
Accelerates character right at ig.Character#speed.
Parameters:Name Type Argument Description mod
Number <optional>
modifier to apply to speed. - Inherited From:
- Source:
-
moveToSequenceNext()
-
- Inherited From:
- Source:
-
moveToStop()
-
- Inherited From:
- Source:
-
moveToUp(mod)
-
Accelerates character up at ig.Character#speed.
Parameters:Name Type Argument Description mod
Number <optional>
modifier to apply to speed. - Inherited From:
- Source:
-
moveToUpdate()
-
- Inherited From:
- Source:
-
pause()
-
- Inherited From:
- Source:
-
placeholdAnims()
-
Ensures all expected animations are present so checks don't have to be made at runtime. IMPORTANT: when an expected animation is missing, it is placeholded by the init anim or the current anim. This is not a smart fix!
- Inherited From:
- 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:
{ Array } vertices of the shape cast by light from edge. -
ready()
-
Called by game when character added to game world.
- restores all stats to full
- adds temporary invulnerability- Inherited From:
- Source:
-
rebuild()
-
Rebuilds entity by updating all animations.
- Inherited From:
- Source:
-
receiveDamage() → {Boolean}
-
Receives damage.
- optionally, creates explosion based on ig.Character#explodingDamage
- optionally, becomes temporarily invulnerable based on ig.Character#damageDelay- Inherited From:
- Source:
{ Boolean } whether applied. -
receiveEnergy(amount, from)
-
Restore energy amount.
Parameters:Name Type Argument Description amount
Number amount to restore. from
ig.EntityExtended <optional>
entity source. - Inherited From:
- Source:
-
receiveHealing(amount, from)
-
Restore health amount.
Parameters:Name Type Argument Description amount
Number amount to restore. from
ig.EntityExtended <optional>
entity source. - Inherited From:
- Source:
-
recordChanges(force)
-
Records limited changes in transform and sets ig.EntityExtended#changed and ig.EntityExtended#moving.
Parameters:
- called automatically by ig.EntityExtended#updateName 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()
-
- 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:
-
regenerate()
-
Restores stats at a steady rate.
- Inherited From:
- Source:
-
removeControl()
-
Removes control from character.
- 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:
-
resetExtras()
-
Resets character movement, velocity, and flip.
- Inherited From:
- 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:
-
restoreStats(from)
-
Restores all stats to their max values.
Parameters:Name Type Argument Description from
ig.EntityExtended <optional>
entity source. - 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()
-
- 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:
-
setPerformance()
-
Sets this entity's performance level.
- Inherited From:
- Source:
-
setUngrounded()
-
- Inherited From:
- Source:
-
spawn()
-
Called when character spawned.
- Inherited From:
- Source:
-
temporaryInvulnerability(duration)
-
Makes character temporarily invulnerable.
Parameters:Name Type Argument Default Description duration
Number <optional>
ig.Character#damageDelay duration in seconds of invulnerability - Inherited From:
- Source:
-
temporaryInvulnerabilityEnd()
-
Ends a temporary invulnerability in progress.
- Inherited From:
- 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:Name Type Description entity
ig.EntityExtended entity to check against. - Inherited From:
- Source:
{ Boolean } if touches other. -
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:
{ 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()
-
- Inherited From:
- Source:
-
update()
-
Entities update is now broken down into a series of functions/methods, which can be opted into based on ig.EntityExtended#frozen and ig.EntityExtended#performance.
- paused and frozen entities don't update at all
- performance === ig.EntityExtended.PERFORMANCE.STATIC entities only check if visible and do ig.EntityExtended#updateVisible
- performance === ig.EntityExtended.PERFORMANCE.MOVABLE does all static performance steps plus can move self or be moved, but ignores collision map, and checks for changes via ig.EntityExtended#updateChanges and ig.EntityExtended#recordChanges
- performance === ig.EntityExtended.PERFORMANCE.DYNAMIC does all movable performance steps plus collides with collision map and has physics forces via ig.EntityExtended#updateDynamics IMPORTANT: ig.EntityExtended#performance has nothing to do with entity to entity collisions, which is defined by ig.EntityExtended#collides.- Inherited From:
- Source:
-
updateBounds()
-
Updates bounds.
- called automatically by ig.EntityExtended#recordChanges when ig.EntityExtended#needsBounds- Inherited From:
- Source:
-
updateChanges()
-
Changes character by updating various actions.
- updates temporary invulnerability
- regenerates stats
- updates abilities
- updates jump
- updates climb- Inherited From:
- Source:
-
updateCurrentAnim() → {Boolean}
-
Updates the current animation based on the status of the character.
- tries to swap to climb animation when climbing
- tries to swap to stairs animation when climbing stairs
- tries to swap to jump animation when jumping
- tries to swap to fall animation when in air but not jumping
- tries to swap to moveX/Y/Left/Right/Up/Down animation when moving
- defaults to idle animation- Inherited From:
- Source:
{ Boolean } whether using non-idle animation -
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 various velocities and frictions based on whether grounded, climbing, etc.
- Inherited From:
- Source:
-
updateVisible()
-
Updates visible and current animation via ig.Character#updateCurrentAnim.
- Inherited From:
- Source: