Tanks Multiplayer
1.4
|
Custom Collectible implementation for scene owned (unassigned) or team owned items. E.g. allowing for 'Rambo' pickups, Capture the Flag items etc. More...
Public Member Functions | |
override void | OnTriggerEnter (Collider col) |
Server only: check for players colliding with the powerup. Possible collision are defined in the Physics Matrix. More... | |
override bool | Apply (Player p) |
Overrides the default behavior with a custom implementation. Check for the carrier and item position to decide valid pickup. More... | |
override void | OnDrop () |
Overrides the default behavior with a custom implementation. More... | |
override void | OnReturn () |
Overrides the default behavior with a custom implementation. More... | |
![]() | |
override void | OnStartClient () |
Get component references once the network is initialized. More... | |
virtual void | OnPickup () |
Virtual implementation called when this Collectible gets picked up. This is called for CollectionType = Pickup items only. More... | |
Public Attributes | |
int | teamIndex = -1 |
Team index this Collectible belongs to, or -1 if unassigned. Teams are defined in the GameManager script inspector. More... | |
Material | baseMaterial |
Optional: Material that should be re-assigned if this Collectible is dropped or returned. More... | |
MeshRenderer | targetRenderer |
Optional: Renderer on which the material should be modified depending on carrier team. More... | |
![]() | |
NetworkInstanceId | parentId |
Network reference to the object that spawned this item in the scene. Used for access to the ObjectSpawner parent in OnDespawn(). More... | |
AudioClip | useClip |
Clip to play when this Collectible is consumed by a player. More... | |
NetworkInstanceId | carrierId |
Persistent network ID of the Player that picked up this Collectible. More... | |
ObjectSpawner | spawner |
Reference to the local object (script) that spawned this Collectible. More... | |
Custom Collectible implementation for scene owned (unassigned) or team owned items. E.g. allowing for 'Rambo' pickups, Capture the Flag items etc.
|
virtual |
Overrides the default behavior with a custom implementation. Check for the carrier and item position to decide valid pickup.
Reimplemented from Collectible.
|
virtual |
Overrides the default behavior with a custom implementation.
Reimplemented from Collectible.
|
virtual |
Overrides the default behavior with a custom implementation.
Reimplemented from Collectible.
|
virtual |
Server only: check for players colliding with the powerup. Possible collision are defined in the Physics Matrix.
Reimplemented from Collectible.
Material baseMaterial |
Optional: Material that should be re-assigned if this Collectible is dropped or returned.
MeshRenderer targetRenderer |
Optional: Renderer on which the material should be modified depending on carrier team.
int teamIndex = -1 |
Team index this Collectible belongs to, or -1 if unassigned. Teams are defined in the GameManager script inspector.