BallisticNG
 All Classes Namespaces Functions Variables Enumerations Properties
Public Member Functions | Public Attributes | Static Public Attributes
PickupBase Class Reference
Inheritance diagram for PickupBase:
PickupAutopilot PickupCannons PickupEnergyWall PickupEPack PickupHellstorm PickupHunter PickupMines PickupMissiles PickupPlasmaBolt PickupQuake PickupRockets PickupShield PickupTransferBeam PickupTurbo PickupWormhole

List of all members.

Public Member Functions

delegate void OnPickupInitDelegate (PickupBase pickup, ShipRefs r)
delegate void OnPickupDeinitDelegate (PickupBase pickup, ShipRefs r)
 PickupBase (ShipRefs r)
virtual void OnUse ()
 Called when the pickup is used.
virtual void OnDrop ()
 Called when the pickup is dropped.
virtual void OnAbsorb ()
 Called when the pickup is absorbed.
virtual void OnUpdate ()
 Called by the parent ship on Update.
virtual void OnFixedUpdate ()
 Called by the parent ship on FixedUpdate.
virtual void OnSpawn ()
 Called when the weapon wants to spawn an object.
virtual void OnAiInit ()
 Called by the Ai when it first detects this pickup is being used.
virtual void AiUpdate (float holdTimer, float unscaledHoldTimer)
 Called by the Ai's weapon update function - use this to allow the AI to decide what to do.
void AiUseAfterDelay (float time)
 Enters delayed use mode for the desired amount of time.
bool UpdateDelayedUse ()
 Updates the AI delayed use timer and fires it once the timer depletes. Returns false if normal AI code can be ran, otherwise returns true.

Public Attributes

const float AiReactionTime = 0.6f
ShipRefs R
 The ship that owns this pickup.
float AbsorbAmount = 12
 How much shield energy this pickup restores on absorbing in 2280.
bool CallOnDropped
 Whether this pickup should call the OnDropped delegate when dropped.
float AiUsageDelay
 Can be used to create an artifical delay before Ai decide what to do with this pickup.
bool AiWarnedPlayer
 Can be used to determine once a player has been warned that the weapon is being used.
bool AiWaitingForUseDelay
 Whether the Ai is waiting for the delayed timer to count down before firing.
float AiDelayedTimeUntilUse
 The amount of time the AI is waiting for before firing.

Static Public Attributes

static OnPickupInitDelegate OnPickupInit
 Called when a pickup is initialized.
static OnPickupDeinitDelegate OnPickupDeinit
 Called when a pickup is dropped.

Member Function Documentation

virtual void PickupBase.AiUpdate ( float  holdTimer,
float  unscaledHoldTimer 
) [inline, virtual]

Called by the Ai's weapon update function - use this to allow the AI to decide what to do.

Parameters:
holdTimerHow long the Ai has been holding this pickup with scaling.
unscaledHoldTimerHow long the Ai has been holding this pickup without any scaling.

Reimplemented in PickupTransferBeam, PickupMissiles, PickupCannons, PickupRockets, PickupPlasmaBolt, PickupMines, PickupQuake, PickupShield, PickupEnergyWall, and PickupTurbo.

void PickupBase.AiUseAfterDelay ( float  time) [inline]

Enters delayed use mode for the desired amount of time.

virtual void PickupBase.OnAbsorb ( ) [inline, virtual]

Called when the pickup is absorbed.

Reimplemented in PickupCannons, PickupAutopilot, PickupPlasmaBolt, and PickupMines.

virtual void PickupBase.OnAiInit ( ) [inline, virtual]

Called by the Ai when it first detects this pickup is being used.

Reimplemented in PickupTransferBeam, PickupMissiles, PickupCannons, PickupRockets, PickupPlasmaBolt, PickupMines, PickupQuake, PickupEPack, PickupShield, PickupEnergyWall, and PickupTurbo.

virtual void PickupBase.OnDrop ( ) [inline, virtual]

Called when the pickup is dropped.

Reimplemented in PickupMissiles, PickupTransferBeam, PickupAutopilot, PickupPlasmaBolt, PickupHellstorm, and PickupMines.

virtual void PickupBase.OnFixedUpdate ( ) [inline, virtual]

Called by the parent ship on FixedUpdate.

Reimplemented in PickupCannons.

virtual void PickupBase.OnSpawn ( ) [inline, virtual]

Called when the weapon wants to spawn an object.

Reimplemented in PickupHellstorm, and PickupHunter.

virtual void PickupBase.OnUpdate ( ) [inline, virtual]

Called by the parent ship on Update.

Reimplemented in PickupAutopilot, PickupTransferBeam, PickupPlasmaBolt, PickupHellstorm, PickupMissiles, and PickupMines.

virtual void PickupBase.OnUse ( ) [inline, virtual]
bool PickupBase.UpdateDelayedUse ( ) [inline]

Updates the AI delayed use timer and fires it once the timer depletes. Returns false if normal AI code can be ran, otherwise returns true.

Returns:

Member Data Documentation

How much shield energy this pickup restores on absorbing in 2280.

The amount of time the AI is waiting for before firing.

Can be used to create an artifical delay before Ai decide what to do with this pickup.

Whether the Ai is waiting for the delayed timer to count down before firing.

Can be used to determine once a player has been warned that the weapon is being used.

Whether this pickup should call the OnDropped delegate when dropped.

OnPickupDeinitDelegate PickupBase.OnPickupDeinit [static]

Called when a pickup is dropped.

OnPickupInitDelegate PickupBase.OnPickupInit [static]

Called when a pickup is initialized.

The ship that owns this pickup.


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