Click or drag to resize

LightningBeamSpellScript Class

Lightning bolt beam spell script, like a phasor or laser
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          DigitalRuby.ThunderAndLightningLightningSpellScript
            DigitalRuby.ThunderAndLightningLightningBeamSpellScript

Namespace:  DigitalRuby.ThunderAndLightning
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
public class LightningBeamSpellScript : LightningSpellScript

The LightningBeamSpellScript type exposes the following members.

Constructors
  NameDescription
Public methodLightningBeamSpellScript
Initializes a new instance of the LightningBeamSpellScript class
Top
Properties
  NameDescription
Public propertyanimation Obsolete.

The Animation attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyaudio Obsolete.

The AudioSource attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertycamera Obsolete.

The Camera attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyCanCastSpell
Determines whether the spell can be cast or not
(Inherited from LightningSpellScript.)
Public propertyCasting
Is the spell currently being cast?
(Inherited from LightningSpellScript.)
Public propertycollider Obsolete.

The Collider attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertycollider2D Obsolete.

The Collider2D component attached to the object.

(Inherited from Component.)
Public propertyconstantForce Obsolete.

The ConstantForce attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Protected propertyCooldownTimer
Cooldown, in seconds, remaining before spell can be cast again
(Inherited from LightningSpellScript.)
Protected propertyDurationTimer
Duration, in seconds, remaining for the spell
(Inherited from LightningSpellScript.)
Public propertyenabled

Enabled Behaviours are Updated, disabled Behaviours are not.

(Inherited from Behaviour.)
Public propertygameObject

The game object this component is attached to. A component is always attached to a game object.

(Inherited from Component.)
Public propertyguiElement Obsolete. (Inherited from Component.)
Public propertyguiText Obsolete.

The GUIText attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyguiTexture Obsolete.

The GUITexture attached to this GameObject (Read Only). (null if there is none attached).

(Inherited from Component.)
Public propertyhideFlags

Should the object be hidden, saved with the scene or modifiable by the user?

(Inherited from Object.)
Public propertyhingeJoint Obsolete.

The HingeJoint attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyisActiveAndEnabled

Has the Behaviour had enabled called.

(Inherited from Behaviour.)
Public propertylight Obsolete.

The Light attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyname

The name of the object.

(Inherited from Object.)
Public propertynetworkView Obsolete.

The NetworkView attached to this GameObject (Read Only). (null if there is none attached).

(Inherited from Component.)
Public propertyparticleEmitter Obsolete.

The ParticleEmitter attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyparticleSystem Obsolete.

The ParticleSystem attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyrenderer Obsolete.

The Renderer attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyrigidbody Obsolete.

The Rigidbody attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyrigidbody2D Obsolete.

The Rigidbody2D that is attached to the Component's GameObject.

(Inherited from Component.)
Public propertyrunInEditMode

Allow a specific instance of a MonoBehaviour to run in edit mode (only available in the editor).

(Inherited from MonoBehaviour.)
Public propertytag

The tag of this game object.

(Inherited from Component.)
Public propertytransform

The Transform attached to this GameObject.

(Inherited from Component.)
Public propertyuseGUILayout

Disabling this lets you skip the GUI layout phase.

(Inherited from MonoBehaviour.)
Top
Methods
  NameDescription
Public methodActivateSpell
Equip / ready the spell
(Inherited from LightningSpellScript.)
Protected methodApplyCollisionForce
Apply collision force at a point
(Inherited from LightningSpellScript.)
Public methodBroadcastMessage(String)

Calls the method named methodName on every MonoBehaviour in this game object or any of its children.

(Inherited from Component.)
Public methodBroadcastMessage(String, Object)

Calls the method named methodName on every MonoBehaviour in this game object or any of its children.

(Inherited from Component.)
Public methodBroadcastMessage(String, SendMessageOptions)

Calls the method named methodName on every MonoBehaviour in this game object or any of its children.

(Inherited from Component.)
Public methodBroadcastMessage(String, Object, SendMessageOptions)

Calls the method named methodName on every MonoBehaviour in this game object or any of its children.

(Inherited from Component.)
Public methodCancelInvoke

Cancels all Invoke calls on this MonoBehaviour.

(Inherited from MonoBehaviour.)
Public methodCancelInvoke(String)

Cancels all Invoke calls with name methodName on this behaviour.

(Inherited from MonoBehaviour.)
Public methodCastSpell
Cast the spell
(Inherited from LightningSpellScript.)
Public methodCompareTag

Is this game object tagged with tag ?

(Inherited from Component.)
Public methodDeactivateSpell
Unequip the spell
(Inherited from LightningSpellScript.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetComponent(Type)

Returns the component of Type type if the game object has one attached, null if it doesn't.

(Inherited from Component.)
Public methodGetComponent(String)

Returns the component with name type if the game object has one attached, null if it doesn't.

(Inherited from Component.)
Public methodGetComponent``1 (Inherited from Component.)
Public methodGetComponentInChildren(Type)

Returns the component of Type type in the GameObject or any of its children using depth first search.

(Inherited from Component.)
Public methodGetComponentInChildren(Type, Boolean) (Inherited from Component.)
Public methodGetComponentInChildren``1 (Inherited from Component.)
Public methodGetComponentInChildren``1(Boolean) (Inherited from Component.)
Public methodGetComponentInParent(Type)

Returns the component of Type type in the GameObject or any of its parents.

(Inherited from Component.)
Public methodGetComponentInParent``1 (Inherited from Component.)
Public methodGetComponents(Type)

Returns all components of Type type in the GameObject.

(Inherited from Component.)
Public methodGetComponents(Type, ListComponent) (Inherited from Component.)
Public methodGetComponents``1 (Inherited from Component.)
Public methodGetComponents``1(ListUMP) (Inherited from Component.)
Public methodGetComponentsInChildren(Type)

Returns all components of Type type in the GameObject or any of its children.

(Inherited from Component.)
Public methodGetComponentsInChildren(Type, Boolean)

Returns all components of Type type in the GameObject or any of its children.

(Inherited from Component.)
Public methodGetComponentsInChildren``1 (Inherited from Component.)
Public methodGetComponentsInChildren``1(Boolean) (Inherited from Component.)
Public methodGetComponentsInChildren``1(ListUMP) (Inherited from Component.)
Public methodGetComponentsInChildren``1(Boolean, ListUMP) (Inherited from Component.)
Public methodGetComponentsInParent(Type) (Inherited from Component.)
Public methodGetComponentsInParent(Type, Boolean)

Returns all components of Type type in the GameObject or any of its parents.

(Inherited from Component.)
Public methodGetComponentsInParent``1 (Inherited from Component.)
Public methodGetComponentsInParent``1(Boolean) (Inherited from Component.)
Public methodGetComponentsInParent``1(Boolean, ListUMP) (Inherited from Component.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetInstanceID

Returns the instance id of the object.

(Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodInvoke

Invokes the method methodName in time seconds.

(Inherited from MonoBehaviour.)
Public methodInvokeRepeating

Invokes the method methodName in time seconds, then repeatedly every repeatRate seconds.

(Inherited from MonoBehaviour.)
Public methodIsInvoking

Is any invoke pending on this MonoBehaviour?

(Inherited from MonoBehaviour.)
Public methodIsInvoking(String)

Is any invoke on methodName pending?

(Inherited from MonoBehaviour.)
Protected methodLateUpdate
Update
(Overrides LightningSpellScriptLateUpdate.)
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodOnActivated
On activated
(Inherited from LightningSpellScript.)
Protected methodOnCastSpell
OnCastSpell
(Overrides LightningSpellScriptOnCastSpell.)
Protected methodOnDeactivated
On deactivated
(Inherited from LightningSpellScript.)
Protected methodOnDestroy
On destroy - derived classes should call base class method first
(Inherited from LightningSpellScript.)
Protected methodOnStopSpell
OnStopSpell
(Overrides LightningSpellScriptOnStopSpell.)
Protected methodPlayCollisionSound
Play a collision sound
(Inherited from LightningSpellScript.)
Public methodSendMessage(String)

Calls the method named methodName on every MonoBehaviour in this game object.

(Inherited from Component.)
Public methodSendMessage(String, Object)

Calls the method named methodName on every MonoBehaviour in this game object.

(Inherited from Component.)
Public methodSendMessage(String, SendMessageOptions)

Calls the method named methodName on every MonoBehaviour in this game object.

(Inherited from Component.)
Public methodSendMessage(String, Object, SendMessageOptions)

Calls the method named methodName on every MonoBehaviour in this game object.

(Inherited from Component.)
Public methodSendMessageUpwards(String)

Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour.

(Inherited from Component.)
Public methodSendMessageUpwards(String, Object)

Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour.

(Inherited from Component.)
Public methodSendMessageUpwards(String, SendMessageOptions)

Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour.

(Inherited from Component.)
Public methodSendMessageUpwards(String, Object, SendMessageOptions)

Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour.

(Inherited from Component.)
Protected methodStart
Start
(Overrides LightningSpellScriptStart.)
Public methodStartCoroutine(IEnumerator)

Starts a coroutine.

(Inherited from MonoBehaviour.)
Public methodStartCoroutine(String)

Starts a coroutine named methodName.

(Inherited from MonoBehaviour.)
Public methodStartCoroutine(String, Object)

Starts a coroutine named methodName.

(Inherited from MonoBehaviour.)
Public methodStartCoroutine_Auto Obsolete. (Inherited from MonoBehaviour.)
Public methodStopAfterSeconds
Stop the spell after a certain amount of seconds. If the spell is stopped before seconds elapses, nothing happens.
(Inherited from LightningSpellScript.)
Public methodStopAllCoroutines

Stops all coroutines running on this behaviour.

(Inherited from MonoBehaviour.)
Public methodStopCoroutine(String)

Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour.

(Inherited from MonoBehaviour.)
Public methodStopCoroutine(IEnumerator)

Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour.

(Inherited from MonoBehaviour.)
Public methodStopCoroutine(Coroutine)

Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour.

(Inherited from MonoBehaviour.)
Public methodStopSpell
Stop casting a spell. Some spells are single shot and this method does nothing. Spells that are continouous for example would stop with this method call.
(Inherited from LightningSpellScript.)
Public methodToString

Returns the name of the GameObject.

(Inherited from Object.)
Protected methodUpdate
Update. Derived classes should call base class method first.
(Inherited from LightningSpellScript.)
Top
Fields
  NameDescription
Public fieldCollisionAudioClips
Collision audio clips. One will be chosen at random and played one shot with CollisionAudioSource.
(Inherited from LightningSpellScript.)
Public fieldCollisionAudioSource
Collision audio source
(Inherited from LightningSpellScript.)
Public fieldCollisionCallback
Callback for collision events
Public fieldCollisionForce
The force to explode with when there is a collision
(Inherited from LightningSpellScript.)
Public fieldCollisionForceMode
Collision force mode
(Inherited from LightningSpellScript.)
Public fieldCollisionIsExplosion
Whether the collision is an exploision. If not explosion, collision is directional.
(Inherited from LightningSpellScript.)
Public fieldCollisionMask
The layers that the spell should collide with
(Inherited from LightningSpellScript.)
Public fieldCollisionParticleSystem
The particle system for collisions. For best effects, this should emit particles in bursts at time 0 and not loop.
(Inherited from LightningSpellScript.)
Public fieldCollisionRadius
The radius of the collision explosion
(Inherited from LightningSpellScript.)
Public fieldCollisionVolumeRange
Collision sound volume range.
(Inherited from LightningSpellScript.)
Public fieldCooldown
The cooldown in seconds. Once cast, the spell must wait for the cooldown before being cast again.
(Inherited from LightningSpellScript.)
Public fieldDirection
The direction of the spell. Should be normalized. Does not change unless explicitly modified.
(Inherited from LightningSpellScript.)
Public fieldDuration
The duration in seconds that the spell will last. Not all spells support a duration. For one shot spells, this is how long the spell cast / emission light, etc. will last.
(Inherited from LightningSpellScript.)
Public fieldEmissionLight
Light to illuminate when spell is cast
(Inherited from LightningSpellScript.)
Public fieldEmissionParticleSystem
Emission particle system. For best results use world space, turn off looping and play on awake.
(Inherited from LightningSpellScript.)
Public fieldEmissionSound
Emission sound
(Inherited from LightningSpellScript.)
Public fieldEndPointRandomization
Give the end point some randomization
Public fieldLightningPathScript
The lightning path script creating the beam of lightning
Public fieldMaxDistance
The maximum distance of the spell
(Inherited from LightningSpellScript.)
Public fieldSpellEnd
The end point of the spell. Set this to an empty game object. This will change depending on things like collisions, randomness, etc. Not all spells need an end object, but create this anyway to be sure.
(Inherited from LightningSpellScript.)
Public fieldSpellStart
The start point of the spell. Set this to a muzzle end or hand.
(Inherited from LightningSpellScript.)
Top
See Also