Constructor
new MySupply(scene, material, texts, scaleFactor, positionX, positionY, positionZ)
Instantiates a new supply instance.
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
scene |
CGFscene
|
the scene | |
material |
CGFappearance
|
the material of the supply | |
texts |
Array.<CGFtexture>
|
the textures of the supply | |
scaleFactor |
number
|
0.18 | the scale factor of the supply |
positionX |
number
|
0 | the X position of the supply |
positionY |
number
|
0 | the Y position of the supply |
positionZ |
number
|
0 | the Z position of the supply |
Methods
drop(dropPosition)
Drops the supply in a specific position.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
dropPosition |
Array.<number>
|
the drop position array |
land()
Called when the supply lands, sets the state of the supply to LANDED.
- Source:
update(t)
Updates the supply position and state.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
t |
number
|
the current time |