Constructor
new MySupplyManager(scene, numberOfSupplies)
Instantiates a new supply manager instance.
- Source:
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
scene |
CGFscene
|
the scene | |
numberOfSupplies |
integer
|
5 | the number of supplies |
Methods
drop(vehicle)
Drops a supply, if possible, in the vehicle position.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
vehicle |
MyVehicle
|
the MyVehicle class |
update(t)
Updates each supply in the array and the number of supplies delivered.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
t |
number
|
the current time |