Members
-
autoManagePlayer :Boolean
-
Whether to automatically manage player if within level. IMPORTANT: this only checks once when the level is first created and on each ig.Player#spawn!
-
<readonly> entity :ig.EntityExtended
-
Entity to control / manage, ideally an entity that descends from ig.Character and not just a plain entity. IMPORTANT: do not set this property directly, use ig.PlayerManager#manage instead!
- Default Value:
- null
- Source:
-
<readonly> entityFallback :ig.EntityExtended
-
Entity to fallback to control when ig.PlayerManager#entity does not exist. IMPORTANT: do not set this property directly, use ig.PlayerManager#manageFallback or ig.PlayerManager#managePlayer instead!
- Default Value:
- null
- Source:
-
group :Bitflag|Number|String
-
Groups to merge into managed entity's ig.EntityExtended#group.
- Source:
-
holdToMove :Boolean
-
Whether to allow touch/click and hold to be interpreted as movement.
-
onManageStarted :ig.Signal
-
Signal dispatched whenever an entity becomes managed.
- created on init.- Source:
-
onManageStopped :ig.Signal
-
Signal dispatched whenever the managed entity is removed.
- created on init.- Source:
-
swipeToJump :Boolean
-
Whether to allow swipe up to be interpreted as jump.
-
type :Bitflag|Number|String
-
Types to merge into managed entity's ig.EntityExtended#type.
- Source:
-
zIndex :Number
-
Z index to merge into managed entity's ig.EntityExtended#zIndex.
- Default Value:
- 0
- Source:
Methods
-
handleInput()
-
Handles input translation to basic movement, jumping, and climbing, and tries to call controlled entity's handleInput method.
- Source:
-
highlightManaged()
-
Attempts to highlight managed entity if the entity has a "highlight" animation.
- Source:
-
init(settings)
-
Initializes manager.
Parameters:Name Type Description settings
Object settings that correspond to manager properties - Source:
-
isManagedControllable() → {Boolean}
-
Checks if an the currently managed entity can be controlled.
- Source:
{ Boolean } whether entity can be controlled. -
manage(entity)
-
Manages an entity by calling ig.PlayerManager#manageStart if valid new entity, or ig.PlayerManager#manageRelease if no entity passed.
Parameters:Name Type Argument Description entity
ig.EntityExtended <optional>
entity to start managing, or none if should stop managing. - Source:
-
manageFallback(entity)
-
Sets a fallback entity to manage when no other entities to manage.
Parameters:Name Type Argument Description entity
ig.EntityExtended <optional>
entity to set as fallback - Source:
-
managePlayer()
-
Special case for managing player.
- Source:
-
manageRelease(entity)
-
Releases management by calling ig.PlayerManager#manageStop if currently managing an entity.
Parameters:Name Type Argument Description entity
ig.EntityExtended <optional>
entity to release, or if none passed releases currently managed entity. - Source:
-
manageReleaseFallback(entity)
-
Stops managing fallback entity.
Parameters:Name Type Argument Description entity
ig.EntityExtended <optional>
entity to release, or if none passed releases fallback entity. - Source:
-
manageStart(entity)
-
Starts managing entity, attempts to call entity's "manageStart" method, and dispatches ig.PlayerManager#onManageStarted. IMPORTANT: do not call this method directly, use ig.PlayerManager#manage. It is okay to override this method.
Parameters:Name Type Description entity
ig.EntityExtended entity to manage. - Source:
-
manageStop()
-
Stops managing entity, attempts to call entity's "manageStop" method, and dispatches ig.PlayerManager#onManageStopped. IMPORTANT: do not call this method directly, use ig.PlayerManager#manageRelease. It is okay to override this method.
- Source:
-
ready()
-
Sets manager as ready. Called automatically at end of ig.GameExtended#buildLevel.
- Source:
-
reset()
-
Resets manager.
- Source:
-
update()
-
Updates and handles switching entities, inputs, etc.
- Source: