Tanks Multiplayer  1.5
Public Member Functions | Public Attributes | List of all members
CollectibleTeam

Custom Collectible implementation for scene owned (unassigned) or team owned items. E.g. allowing for 'Rambo' pickups, Capture the Flag items etc. More...

Inheritance diagram for CollectibleTeam:
Collectible

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...
 
- Public Member Functions inherited from Collectible
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...
 
- Public Attributes inherited from Collectible
AudioClip useClip
 Clip to play when this Collectible is consumed by a player. More...
 
ObjectSpawner spawner
 Reference to the local object (script) that spawned this Collectible. More...
 
int carrierId = -1
 Persistent network (PhotonView) ID of the Player that picked up this Collectible. More...
 

Detailed Description

Custom Collectible implementation for scene owned (unassigned) or team owned items. E.g. allowing for 'Rambo' pickups, Capture the Flag items etc.

Member Function Documentation

override bool Apply ( Player  p)
virtual

Overrides the default behavior with a custom implementation. Check for the carrier and item position to decide valid pickup.

Reimplemented from Collectible.

override void OnDrop ( )
virtual

Overrides the default behavior with a custom implementation.

Reimplemented from Collectible.

override void OnReturn ( )
virtual

Overrides the default behavior with a custom implementation.

Reimplemented from Collectible.

override void OnTriggerEnter ( Collider  col)
virtual

Server only: check for players colliding with the powerup. Possible collision are defined in the Physics Matrix.

Reimplemented from Collectible.

Member Data Documentation

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.


The documentation for this class was generated from the following file: