Class: TransportPlan

TransportPlan()

new TransportPlan()

Source:

Classes

TransportPlan

Members

BOARDING

We're trying to board units onto our ships.
Source:

ID

Source:

SAILING

We're moving ships and eventually unload units.
Source:

[undefined]

Source:

boardingPos

Source:

boardingPos[undefined]

Source:

boardingPos[undefined]

Source:

boardingPos[undefined]

Source:

boardingPos[undefined]

Source:

boardingPos[undefined]

Source:

boardingPos[undefined]

Source:

boardingPos[undefined]

Source:

boardingPos[undefined]

Source:

boardingRange

Source:

canceled

Source:

canceled

Source:

debug

Source:

endIndex

Source:

endIndex

Source:

endPos

Source:

endPos

Source:

failed

Source:

failed

Source:

failed

Source:

flotilla

Source:

nTry

Source:

nTry

Source:

nTry[undefined]

Source:

nTry[undefined]

Source:

nTry[undefined]

Source:

nTry[undefined]

Source:

nTry[undefined]

Source:

nTry[undefined]

Source:

needSplit

Source:

needSplit

Source:

needTransportShips

Source:

needTransportShips

Source:

needTransportShips

Source:

recovered

Source:

recovered

Source:

sea

Source:

sea

Source:

ships

Source:

startIndex

Source:

state

Source:

state

Source:

transportShips

Source:

units

Source:

unloaded

Source:

unloaded

Source:

Methods

Deserialize()

Source:

Serialize()

Source:

addUnit()

add a unit to this plan
Source:

assignShip()

Source:

assignUnitToShip()

Source:

cancelTransport()

TODO not currently used ... to be fixed
Source:

countFreeSlots()

count available slots
Source:

countFreeSlotsOnShip()

Source:

getBoardingPos()

when avoidEnnemy is true, we try to not board/unboard in ennemy territory
Source:

init()

Source:

isOnBoard()

tell if a unit is garrisoned in one of the ships of this plan, and update its metadata if yes
Source:

onBoarding()

Source:

onSailing()

Source:

releaseAll()

Source:

releaseShip()

Source:

removeUnit()

remove a unit from this plan, if not yet on board
Source:

resetUnit()

Source:

update()

Try to move on and then clear the plan.
Source:

TransportPlan()

Describes a transport plan Constructor assign units (units is an ID array), a destination (position). The naval manager will try to deal with it accordingly. By this I mean that the naval manager will find how to go from access point 1 to access point 2 and then carry units from there. Note: only assign it units currently over land, or it won't work. Also: destination should probably be land, otherwise the units will be lost at sea. metadata for units: transport = this.ID onBoard = ship.id() when affected to a ship but not yet garrisoned = "onBoard" when garrisoned in a ship = undefined otherwise endPos = position of destination metadata for ships transporter = this.ID

Constructor

new TransportPlan()

Source:

Classes

TransportPlan

Members

BOARDING

We're trying to board units onto our ships.
Source:

ID

Source:

SAILING

We're moving ships and eventually unload units.
Source:

[undefined]

Source:

boardingPos

Source:

boardingPos[undefined]

Source:

boardingPos[undefined]

Source:

boardingPos[undefined]

Source:

boardingPos[undefined]

Source:

boardingPos[undefined]

Source:

boardingPos[undefined]

Source:

boardingPos[undefined]

Source:

boardingPos[undefined]

Source:

boardingRange

Source:

canceled

Source:

canceled

Source:

debug

Source:

endIndex

Source:

endIndex

Source:

endPos

Source:

endPos

Source:

failed

Source:

failed

Source:

failed

Source:

flotilla

Source:

nTry

Source:

nTry

Source:

nTry[undefined]

Source:

nTry[undefined]

Source:

nTry[undefined]

Source:

nTry[undefined]

Source:

nTry[undefined]

Source:

nTry[undefined]

Source:

needSplit

Source:

needSplit

Source:

needTransportShips

Source:

needTransportShips

Source:

needTransportShips

Source:

recovered

Source:

recovered

Source:

sea

Source:

sea

Source:

ships

Source:

startIndex

Source:

state

Source:

state

Source:

transportShips

Source:

units

Source:

unloaded

Source:

unloaded

Source:

Methods

Deserialize()

Source:

Serialize()

Source:

addUnit()

add a unit to this plan
Source:

assignShip()

Source:

assignUnitToShip()

Source:

cancelTransport()

TODO not currently used ... to be fixed
Source:

countFreeSlots()

count available slots
Source:

countFreeSlotsOnShip()

Source:

getBoardingPos()

when avoidEnnemy is true, we try to not board/unboard in ennemy territory
Source:

init()

Source:

isOnBoard()

tell if a unit is garrisoned in one of the ships of this plan, and update its metadata if yes
Source:

onBoarding()

Source:

onSailing()

Source:

releaseAll()

Source:

releaseShip()

Source:

removeUnit()

remove a unit from this plan, if not yet on board
Source:

resetUnit()

Source:

update()

Try to move on and then clear the plan.
Source: