All Classes Namespaces Functions Variables Enumerations Enumerator Properties
plyBloxKit.plyEvent Class Reference

Base class for all Event definitions. An Event is part of A plyBlox' State and execute blocks when triggered. How the Event is triggered depends on what kind of Event it is. Have a look at plyEventAttribute to learn more about the Attribute (def.meta data) you need to include for any Event you define. More...

Inherited by plyBloxKit.CollisionEnterEvent1, plyBloxKit.CollisionEnterEvent2, plyBloxKit.CollisionExitEvent1, plyBloxKit.CollisionExitEvent2, plyBloxKit.CollisionStayEvent1, plyBloxKit.CollisionStayEvent2, plyBloxKit.CustomEvent, plyBloxKit.DestroyEvent, plyBloxKit.DisableEvent, plyBloxKit.EnableEvent, plyBloxKit.FixedUpdateEvent, plyBloxKit.FocusEvent, plyBloxKit.LateUpdateEvent, plyBloxKit.MouseDownEvent, plyBloxKit.MouseDragEvent, plyBloxKit.MouseEnterEvent, plyBloxKit.MouseExitEvent, plyBloxKit.MouseOverEvent, plyBloxKit.MouseUpAsButtonEvent, plyBloxKit.MouseUpEvent, plyBloxKit.OnGUIEvent, plyBloxKit.PauseEvent, plyBloxKit.QuitEvent, plyBloxKit.StartEvent, plyBloxKit.StateEnterEvent, plyBloxKit.StateExitEvent, plyBloxKit.TriggerEnterEvent, plyBloxKit.TriggerEnterEvent2, plyBloxKit.TriggerExitEvent, plyBloxKit.TriggerExitEvent2, plyBloxKit.TriggerStayEvent, plyBloxKit.TriggerStayEvent2, plyBloxKit.UpdateEvent, plyGame.ActorClearsSelectionEvent, plyGame.ActorInteractStoppedWithEvent, plyGame.ActorInteractsWithEvent, plyGame.ActorMakesSelectionEvent, plyGame.ActorOnInteractEvent, plyGame.ActorOnInteractStoppedEvent, plyGame.AttribChangeEvent, plyGame.FactionStatusChangedEvent, plyGame.FactionVarChangedEvent, plyGame.HPChangeEvent, plyGame.LevelChangeEvent, plyGame.NPCAIThinkEvent, plyGame.NPCDetectEvent, plyGame.ObjectOnInteractEvent, plyGame.ObjectOnInteractStoppedEvent, plyGame.OnActorDeathEvent, plyGame.OnAddItemToBagEvent, plyGame.OnEquipItemEvent, plyGame.OnRemoveItemFromBagEvent, plyGame.OnScreenShownEvent, plyGame.OntemUseEvent, plyGame.OnUnEquipItemEvent, plyGame.PM_PlayerCreatedEvent, plyGame.SkillActivateEvent, plyGame.SkillEffectEvent, plyGame.SkillFizzleEvent, plyGame.SkillHitEvent, plyGame.SkillSecondHitEvent, plyGame.SpawnCreatedNPCEvent, plyGame.TA_TriggerEnterEvent, plyGame.TA_TriggerExitEvent, plyGame.TA_TriggerStayEvent, and plyGame.XPChangeEvent.

Public Member Functions

virtual System.Type HandlerType ()
 You must override this for custom Events. This should return the type of the component that knows how to handle this event. The Handler, a MonoBehaviour/ Component, will be added to the plyBlox GameObject that this Event is used in. More...
 
virtual void Created ()
 Called at runtime after the state and event was created. This is called in the Awake() of the Blox object. More...
 
virtual void Initialise ()
 Called at runtime after the state and event was created. A good place to init some variables. Be sure to call the base.Initialise() if you override this so that the blocks get their Initialise() called. This is called in the Start() of the Blox object. More...
 
override string ToString ()
 
bool TempVariableDefined (string name)
 Returns True if variable defined, else False More...
 
plyVar GetTempVariable (string name)
 Return a reference to the named Temporary Variable. Will return null if the variable does not exist. More...
 
object GetTempVarValue (string name)
 Return the value of a Temporary Variable. Return null if it does not exist. Keep in mind that the value might simply be null. More...
 
plyVar SetTempVarValue (string name, object val)
 Set the value of a Temporary Variable. Will create it if it does not exist. Return a reference to the variable. Null if failed to create. More...
 

Public Attributes

string name
 Name of the Event.
 
string uniqueIdent
 Use this to find out what kind of Event this is cause the "name" field can be renamed by designer. This will be set to plyEventAttribute.Name you defined for the Event type.
 
plyBlock firstBlock = null
 The first block is where execution will start when the event is triggered.
 
List< plyBlockblocks = new List<plyBlock>()
 This is a list of ALL blocks contained in this Event in no specific order.
 
bool active = true
 Settings this false will cause event to not execute at runtime. Should not be changed at runtime. Can only be changed in Blox editor.
 
Vector2 ___ed = Vector2.zero
 Used by editor. Do not manipulate. Not serialized.
 

Detailed Description

Base class for all Event definitions. An Event is part of A plyBlox' State and execute blocks when triggered. How the Event is triggered depends on what kind of Event it is. Have a look at plyEventAttribute to learn more about the Attribute (def.meta data) you need to include for any Event you define.

Member Function Documentation

virtual void plyBloxKit.plyEvent.Created ( )
virtual

Called at runtime after the state and event was created. This is called in the Awake() of the Blox object.

plyVar plyBloxKit.plyEvent.GetTempVariable ( string  name)

Return a reference to the named Temporary Variable. Will return null if the variable does not exist.

object plyBloxKit.plyEvent.GetTempVarValue ( string  name)

Return the value of a Temporary Variable. Return null if it does not exist. Keep in mind that the value might simply be null.

virtual System.Type plyBloxKit.plyEvent.HandlerType ( )
virtual

You must override this for custom Events. This should return the type of the component that knows how to handle this event. The Handler, a MonoBehaviour/ Component, will be added to the plyBlox GameObject that this Event is used in.

virtual void plyBloxKit.plyEvent.Initialise ( )
virtual

Called at runtime after the state and event was created. A good place to init some variables. Be sure to call the base.Initialise() if you override this so that the blocks get their Initialise() called. This is called in the Start() of the Blox object.

plyVar plyBloxKit.plyEvent.SetTempVarValue ( string  name,
object  val 
)

Set the value of a Temporary Variable. Will create it if it does not exist. Return a reference to the variable. Null if failed to create.

bool plyBloxKit.plyEvent.TempVariableDefined ( string  name)

Returns True if variable defined, else False