Tanks Multiplayer  1.4
Public Member Functions | Public Attributes | List of all members
PowerupBullet

Custom powerup implementation for changing the player's bullet. More...

Inheritance diagram for PowerupBullet:
Collectible

Public Member Functions

override bool Apply (Player p)
 Overrides the default behavior with a custom implementation. Check for the current bullet and refills its ammunition. More...
 
- Public Member Functions inherited from Collectible
override void OnStartClient ()
 Get component references once the network is initialized. More...
 
virtual void OnTriggerEnter (Collider col)
 Server only: check for players colliding with this item. Possible collision are defined in the Physics Matrix. More...
 
virtual void OnPickup ()
 Virtual implementation called when this Collectible gets picked up. This is called for CollectionType = Pickup items only. More...
 
virtual void OnDrop ()
 Virtual implementation called when this Collectible gets dropped on player death. This is called for CollectionType = Pickup items only. More...
 
virtual void OnReturn ()
 Virtual implementation called when this Collectible gets returned. This is called for CollectionType = Pickup items only. More...
 

Public Attributes

int amount = 5
 Amount of shots before returning to the default bullet. More...
 
int bulletIndex = 1
 Index of the new bullet, on the Player script, that should be assigned. More...
 
- Public Attributes inherited from Collectible
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...
 

Detailed Description

Custom powerup implementation for changing the player's bullet.

Member Function Documentation

override bool Apply ( Player  p)
virtual

Overrides the default behavior with a custom implementation. Check for the current bullet and refills its ammunition.

Reimplemented from Collectible.

Member Data Documentation

int amount = 5

Amount of shots before returning to the default bullet.

int bulletIndex = 1

Index of the new bullet, on the Player script, that should be assigned.


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