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< Pickup > | BlockedPickups = new List<Pickup>() |
A list of pickups that are currently blocked from being chosen. | |
static List< Pickup > | PickupWeightingTable = new List<Pickup>() |
The current list of pickups configured with weighting. |
Represents the two colors pickups can be on the the hud.
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>
/
autoRegister | Whether 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!
createDelegate | The delgate (inline) that is called to create the pickup. |
name | The name to be assigned to this pickup. |
pickupHudSprite | The sprite to be used for the pickup hud. |
hudColor | The color of the hud sprite. |
pickupClip | The voice that will be played when this clip has been picked up. |
warningClip | The voice that will be played when a ship is being warned about usage of this pickup. |
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 |
selectDelegate | The delegate (inline) to be called when this pickup is to be selected. |
weight | The weight of this pickup in the pickup roster. A higher relative value to other pickups means it's more likely to be chosen. |
autoRegister | Whether the pickup should be auto registered. |
static void BallisticNG.Pickups.Pickup.BlockPickup | ( | params Pickup[] | pickups | ) | [inline, static] |
Blocks a single or multiple pickups.
pickups | The pickups to block. |
static void BallisticNG.Pickups.Pickup.BlockPickup | ( | params string[] | pickups | ) | [inline, static] |
Blocks a single or multiple pickups.
pickups | The pickups to block. |
void BallisticNG.Pickups.Pickup.WarnPlayer | ( | ) | [inline] |
Plays the warning voice attached to this pickup if there is one.
readonly List<Pickup> BallisticNG.Pickups.Pickup.BlockedPickups = new List<Pickup>() [static] |
A list of pickups that are currently blocked from being chosen.
readonly string [] BallisticNG.Pickups.Pickup.CustomSounds |
The reference names of custom sounds.
The frontend name assigned to this pickup.
The color the hud sprite will be tinted.
readonly string BallisticNG.Pickups.Pickup.Name |
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.
ShipEventDelegate BallisticNG.Pickups.Pickup.OnShipDamaged |
Called when a ship holding the pickup takes damage.
readonly AudioClip BallisticNG.Pickups.Pickup.PickupClip |
The voice that will be played when this clip has been picked up.
readonly Sprite BallisticNG.Pickups.Pickup.PickupHudSprite |
The sprite that is used for the pickup on the heads up display.
List<Pickup> BallisticNG.Pickups.Pickup.PickupWeightingTable = new List<Pickup>() [static] |
The current list of pickups configured with weighting.
readonly AudioClip BallisticNG.Pickups.Pickup.WarningClip |
The voice that will be played when a ship is being warned about usage of this pickup.
readonly int BallisticNG.Pickups.Pickup.Weight = 100 |
The weight of this pickup.