C# Class PlayerDrop, PaperCowboys

This is a dropped object in the scene that appears at random after an enemy dies. This can be a hat, bandanna, ammo or a weapon. Drops are NOT synchronized objects. They exist solely on the player's instance they were instantiated in, and no other player will see it. Objects with the PlayerDrop component are created by GameDirector.RPCGiveDrop which is invoked by the master client.
Inheritance: MonoBehaviour
ファイルを表示 Open project: Gamieon/PaperCowboys Class Usage Examples

Public Properties

Property Type Description
iconRenderer Renderer
iconTransform Transform
itemDrop ItemDrop,
playerCharacter PlayerCharacter,
sndDropPickup UnityEngine.AudioClip

Public Methods

Method Description
FixedUpdate ( ) : void
GiveAmmoDropToPlayer ( ) : void

Called by GiveDropToPlayer to give ammo to the player

GiveCowboyHatToPlayer ( ) : void

Called by GiveDropToPlayer to give a hat to the player

GiveDropToPlayer ( ) : void

Called when the player runs into the drop

GiveMouthpieceToPlayer ( ) : void

Called by GiveDropToPlayer to give a mouthpiece (bandana) to the player

GiveWeaponDropToPlayer ( WeaponDirector, weapon, int defaultAmmo ) : void

Called by GiveDropToPlayer to give a weapon to the player

SelfDestruct ( ) : void

Called when the drop has been on the ground so long that it must be removed automatically. We can't just leave these in the scene forever.

Start ( ) : void

Method Details

FixedUpdate() public method

public FixedUpdate ( ) : void
return void

GiveAmmoDropToPlayer() public method

Called by GiveDropToPlayer to give ammo to the player
public GiveAmmoDropToPlayer ( ) : void
return void

GiveCowboyHatToPlayer() public method

Called by GiveDropToPlayer to give a hat to the player
public GiveCowboyHatToPlayer ( ) : void
return void

GiveDropToPlayer() public method

Called when the player runs into the drop
public GiveDropToPlayer ( ) : void
return void

GiveMouthpieceToPlayer() public method

Called by GiveDropToPlayer to give a mouthpiece (bandana) to the player
public GiveMouthpieceToPlayer ( ) : void
return void

GiveWeaponDropToPlayer() public method

Called by GiveDropToPlayer to give a weapon to the player
public GiveWeaponDropToPlayer ( WeaponDirector, weapon, int defaultAmmo ) : void
weapon WeaponDirector, /// Weapon. ///
defaultAmmo int /// Default ammo. ///
return void

SelfDestruct() public method

Called when the drop has been on the ground so long that it must be removed automatically. We can't just leave these in the scene forever.
public SelfDestruct ( ) : void
return void

Start() public method

public Start ( ) : void
return void

Property Details

iconRenderer public_oe property

The icon renderer.
public Renderer iconRenderer
return Renderer

iconTransform public_oe property

The icon transform.
public Transform iconTransform
return Transform

itemDrop public_oe property

The item that is being offered to the player.
public ItemDrop, itemDrop
return ItemDrop,

playerCharacter public_oe property

The player character receiving the drop
public PlayerCharacter, playerCharacter
return PlayerCharacter,

sndDropPickup public_oe property

The sound of the drop pickup.
public AudioClip,UnityEngine sndDropPickup
return UnityEngine.AudioClip