Class: EntitySelection

EntitySelection()

new EntitySelection()

Source:

Members

SelectFormationAsOne

Source:

dirty

Source:

dirty

Source:

groups

Source:

highlighted

Source:

highlighted

Source:

motionDebugOverlay

Source:

motionDebugOverlay

Source:

selected

Source:

Methods

SetMotionDebugOverlay()

Source:

UpdateFormationSelectionBehaviour()

Source:

addFormationMembers(entities) → {Array.<number>}

Adds the formation members of a selected entities to the selection.
Parameters:
Name Type Description
entities Array.<number> The entity IDs of selected entities.
Source:
Returns:
- Some more entity IDs if part of a formation was selected.
Type
Array.<number>

addList()

Add entities to selection. Play selection sound unless quiet is true
Source:

checkRenamedEntities()

Update selection if some selected entities were renamed (in case of unit promotion or finishing building structure)
Source:

filter(condition) → {Array.<number>}

Parameters:
Name Type Description
condition function A function.
Source:
Returns:
- The entities passing the condition.
Type
Array.<number>

find()

Source:

getFirstSelected()

Source:

getTemplateNames()

Get a list of the template names
Source:

makePrimarySelection()

Deselect everything but entities of the chosen type.
Source:

onChange()

Source:

rebuildSelection()

Source:

removeGroupFromSelection()

Deselect entities of the chosen type.
Source:

removeList(ents, addFormationMembers)

Parameters:
Name Type Description
ents Array.<number> The entities to remove.
addFormationMembers boolean If true we need to add formation members.
Source:

reset()

Source:

selectAndMoveTo()

Source:

setHighlightList()

Source:

size() → {number}

Source:
Returns:
- The number of entities selected.
Type
number

toList()

TODO: This array should not be recreated every call
Source:

update()

Update the selection to take care of changes (like units that have been killed).
Source: