C# Класс 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.
Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
iconRenderer Renderer
iconTransform Transform
itemDrop ItemDrop,
playerCharacter PlayerCharacter,
sndDropPickup UnityEngine.AudioClip

Открытые методы

Метод Описание
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

Описание методов

FixedUpdate() публичный Метод

public FixedUpdate ( ) : void
Результат void

GiveAmmoDropToPlayer() публичный Метод

Called by GiveDropToPlayer to give ammo to the player
public GiveAmmoDropToPlayer ( ) : void
Результат void

GiveCowboyHatToPlayer() публичный Метод

Called by GiveDropToPlayer to give a hat to the player
public GiveCowboyHatToPlayer ( ) : void
Результат void

GiveDropToPlayer() публичный Метод

Called when the player runs into the drop
public GiveDropToPlayer ( ) : void
Результат void

GiveMouthpieceToPlayer() публичный Метод

Called by GiveDropToPlayer to give a mouthpiece (bandana) to the player
public GiveMouthpieceToPlayer ( ) : void
Результат void

GiveWeaponDropToPlayer() публичный Метод

Called by GiveDropToPlayer to give a weapon to the player
public GiveWeaponDropToPlayer ( WeaponDirector, weapon, int defaultAmmo ) : void
weapon WeaponDirector, /// Weapon. ///
defaultAmmo int /// Default ammo. ///
Результат void

SelfDestruct() публичный Метод

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
Результат void

Start() публичный Метод

public Start ( ) : void
Результат void

Описание свойств

iconRenderer публичное свойство

The icon renderer.
public Renderer iconRenderer
Результат Renderer

iconTransform публичное свойство

The icon transform.
public Transform iconTransform
Результат Transform

itemDrop публичное свойство

The item that is being offered to the player.
public ItemDrop, itemDrop
Результат ItemDrop,

playerCharacter публичное свойство

The player character receiving the drop
public PlayerCharacter, playerCharacter
Результат PlayerCharacter,

sndDropPickup публичное свойство

The sound of the drop pickup.
public AudioClip,UnityEngine sndDropPickup
Результат UnityEngine.AudioClip