MySupplyManager

MySupplyManager

Represents the MySupply manager, responsible for handling the MyVehicle supplies.

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

display()

Diplays each supply in the manager.
Source:

drop(vehicle)

Drops a supply, if possible, in the vehicle position.
Source:
Parameters:
Name Type Description
vehicle MyVehicle the MyVehicle class

init()

Initializes the supplies buffers.
Source:

initMaterials()

Initializes the supplies materials.
Source:

initTextures()

Initializes the supplies textures.
Source:

reset()

Resets the supplies.
Source:

update(t)

Updates each supply in the array and the number of supplies delivered.
Source:
Parameters:
Name Type Description
t number the current time