BallisticNG
 All Classes Namespaces Functions Variables Enumerations Properties
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
BallisticNG.Pickups.Pickup Class Reference

List of all members.

Public Types

enum  EHudColor
 Represents the two colors pickups can be on the the hud. More...

Public Member Functions

delegate bool OnSelectDelegate (ShipRefs r, float chance)
delegate PickupBase OnCreateDelegate (ShipRefs r)
delegate bool ShipEventDelegate (Pickup pu, ShipRefs r)
 Pickup (OnCreateDelegate createDelegate, string name, Sprite pickupHudSprite, EHudColor hudColor, AudioClip pickupClip, AudioClip warningClip, string[] customSounds, OnSelectDelegate selectDelegate, bool autoRegister=true)
 Create a new registered pickup. Creating this class automatically registers it into the game!
 Pickup (OnCreateDelegate createDelegate, string name, Sprite pickupHudSprite, EHudColor hudColor, AudioClip pickupClip, AudioClip warningClip, string[] customSounds, OnSelectDelegate selectDelegate, int weight, bool autoRegister=true)
 Create a new registered pickup. Creating this class automatically registers it into the game!
void WarnPlayer ()
 Plays the warning voice attached to this pickup if there is one.

Static Public Member Functions

static void BlockPickup (params Pickup[] pickups)
 Blocks a single or multiple pickups.
static void BlockPickup (params string[] pickups)
 Blocks a single or multiple pickups.

Public Attributes

string FrontendName
 The frontend name assigned to this pickup.
readonly string Name
 The name assigned to this pickup.
readonly int Weight = 100
 The weight of this pickup.
readonly Sprite PickupHudSprite
 The sprite that is used for the pickup on the heads up display.
readonly EHudColor HudColor
 The color the hud sprite will be tinted.
readonly AudioClip PickupClip
 The voice that will be played when this clip has been picked up.
readonly AudioClip WarningClip
 The voice that will be played when a ship is being warned about usage of this pickup.
readonly string[] CustomSounds
 The reference names of custom sounds.
readonly OnSelectDelegate OnSelect
 Called when this pickup is selected to be given to a ship.
readonly OnCreateDelegate OnCreate
 Called when this pickup needs to be created.
ShipEventDelegate OnShipDamaged
 Called when a ship holding the pickup takes damage.

Static Public Attributes

static readonly List< PickupBlockedPickups = new List<Pickup>()
 A list of pickups that are currently blocked from being chosen.
static List< PickupPickupWeightingTable = new List<Pickup>()
 The current list of pickups configured with weighting.

Member Enumeration Documentation

Represents the two colors pickups can be on the the hud.


Constructor & Destructor Documentation

BallisticNG.Pickups.Pickup.Pickup ( OnCreateDelegate  createDelegate,
string  name,
Sprite  pickupHudSprite,
EHudColor  hudColor,
AudioClip  pickupClip,
AudioClip  warningClip,
string[]  customSounds,
OnSelectDelegate  selectDelegate,
bool  autoRegister = true 
) [inline]

Create a new registered pickup. Creating this class automatically registers it into the game!

        <param name="createDelegate">The delgate (inline) that is called to create the pickup.</param>
        <param name="name">The name to be assigned to this pickup.</param>
        <param name="pickupHudSprite">The sprite to be used for the pickup hud.</param>
        <param name="hudColor">The color of the hud sprite.</param>
        <param name="pickupClip">The voice that will be played when this clip has been picked up.</param>
        <param name="warningClip">The voice that will be played when a ship is being warned about usage of this pickup.</param>
        <param name="customSounds">The name of custom sounds to load. Index 0 is the pickup clip, index 1 is the warning clip. If you do not want custom sounds, leave this as null</param>
        <param name="selectDelegate">The delegate (inline) to be called when this pickup is to be selected.</param>

/

Parameters:
autoRegisterWhether the pickup should be auto registered.
BallisticNG.Pickups.Pickup.Pickup ( OnCreateDelegate  createDelegate,
string  name,
Sprite  pickupHudSprite,
EHudColor  hudColor,
AudioClip  pickupClip,
AudioClip  warningClip,
string[]  customSounds,
OnSelectDelegate  selectDelegate,
int  weight,
bool  autoRegister = true 
) [inline]

Create a new registered pickup. Creating this class automatically registers it into the game!

Parameters:
createDelegateThe delgate (inline) that is called to create the pickup.
nameThe name to be assigned to this pickup.
pickupHudSpriteThe sprite to be used for the pickup hud.
hudColorThe color of the hud sprite.
pickupClipThe voice that will be played when this clip has been picked up.
warningClipThe voice that will be played when a ship is being warned about usage of this pickup.
customSoundsThe name of custom sounds to load. Index 0 is the pickup clip, index 1 is the warning clip. If you do not want custom sounds, leave this as null
selectDelegateThe delegate (inline) to be called when this pickup is to be selected.
weightThe weight of this pickup in the pickup roster. A higher relative value to other pickups means it's more likely to be chosen.
autoRegisterWhether the pickup should be auto registered.

Member Function Documentation

static void BallisticNG.Pickups.Pickup.BlockPickup ( params Pickup[]  pickups) [inline, static]

Blocks a single or multiple pickups.

Parameters:
pickupsThe pickups to block.
static void BallisticNG.Pickups.Pickup.BlockPickup ( params string[]  pickups) [inline, static]

Blocks a single or multiple pickups.

Parameters:
pickupsThe pickups to block.

Plays the warning voice attached to this pickup if there is one.


Member Data Documentation

readonly List<Pickup> BallisticNG.Pickups.Pickup.BlockedPickups = new List<Pickup>() [static]

A list of pickups that are currently blocked from being chosen.

The reference names of custom sounds.

The frontend name assigned to this pickup.

The color the hud sprite will be tinted.

The name assigned to this pickup.

readonly OnCreateDelegate BallisticNG.Pickups.Pickup.OnCreate

Called when this pickup needs to be created.

readonly OnSelectDelegate BallisticNG.Pickups.Pickup.OnSelect

Called when this pickup is selected to be given to a ship.

Called when a ship holding the pickup takes damage.

The voice that will be played when this clip has been picked up.

The sprite that is used for the pickup on the heads up display.

The current list of pickups configured with weighting.

The voice that will be played when a ship is being warned about usage of this pickup.

The weight of this pickup.


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