Class: BuildManager

BuildManager()

One task of this manager is to cache the list of structures we have builders for, to avoid having to loop on all entities each time. It also takes care of the structures we can't currently build and should not try to build endlessly.

Constructor

new BuildManager()

Source:

Members

[undefined]

Source:

builders

Source:

builders

Source:

elapsedTime

Source:

unbuildables

Source:

Methods

Deserialize()

Source:

Serialize()

Source:

checkEvents()

Update the builders counters
Source:

findStructureWithClass()

Get the first buildable structure with a given class TODO when several available, choose the best one
Source:

findStructuresByFilter()

Get the buildable structures passing a filter.
Source:

hasBuilder()

Source:

init()

Initialization at start of game
Source:

isUnbuildable()

Source:

numberMissingRoom()

Return the number of unbuildables due to missing room
Source:

resetMissingRoom()

Reset the unbuildables due to missing room
Source:

setBuildable()

Source:

setUnbuildable()

Time is the duration in second that we will wait before checking again if it is buildable
Source:

BuildManager()

new BuildManager()

Source:

Members

[undefined]

Source:

builders

Source:

builders

Source:

elapsedTime

Source:

unbuildables

Source:

Methods

Deserialize()

Source:

Serialize()

Source:

checkEvents()

Update the builders counters
Source:

findStructureWithClass()

Get the first buildable structure with a given class TODO when several available, choose the best one
Source:

findStructuresByFilter()

Get the buildable structures passing a filter.
Source:

hasBuilder()

Source:

init()

Initialization at start of game
Source:

isUnbuildable()

Source:

numberMissingRoom()

Return the number of unbuildables due to missing room
Source:

resetMissingRoom()

Reset the unbuildables due to missing room
Source:

setBuildable()

Source:

setUnbuildable()

Time is the duration in second that we will wait before checking again if it is buildable
Source: