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

A plyBlock is the most basic of blocks and base class of other block types. A Block is something that is inserted into an Event and is what is executed when the Event is triggered. Have a look at plyBlockAttribute to learn more about the attribute (def.meta data) you need to include for any Block being defined. Also see plyBlockFieldAttribute for Block fields (public variables) that you define. More...

Inherited by plyBloxKit.AddComponent_plyBlock, plyBloxKit.Animation_AddMixingTransform_plyBlock, plyBloxKit.Animation_Blend_plyBlock, plyBloxKit.Animation_Play_plyBlock, plyBloxKit.Animation_RemMixingTransform_plyBlock, plyBloxKit.Animation_Stop_plyBlock, plyBloxKit.Animation_StopAll_plyBlock, plyBloxKit.App_Exit_plyBlock, plyBloxKit.AudioListener_Pause_plyBlock, plyBloxKit.AudioSource_Mute_plyBlock, plyBloxKit.AudioSource_Pause_plyBlock, plyBloxKit.AudioSource_Play_plyBlock, plyBloxKit.AudioSource_PlayOneShot_plyBlock, plyBloxKit.AudioSource_SetLoop_plyBlock, plyBloxKit.AudioSource_SetPitch_plyBlock, plyBloxKit.AudioSource_SetVolume_plyBlock, plyBloxKit.AudioSource_Stop_plyBlock, plyBloxKit.BreakLoop_plyBlock, plyBloxKit.BroadcastMessage_plyBlock, plyBloxKit.ChangeGFXQuality_plyBlock, plyBloxKit.Comment_plyBlock, plyBloxKit.ContinueLoop_plyBlock, plyBloxKit.Cursor_Lock_plyBlock, plyBloxKit.Cursor_Show_plyBlock, plyBloxKit.Debug_plyBlock, plyBloxKit.DestroyObject_plyBlock, plyBloxKit.DontDestroyOnLoadObject_plyBlock, plyBloxKit.ElseCondition_plyBlock, plyBloxKit.ElseIfCondition_plyBlock, plyBloxKit.EnDisableComponent_plyBlock, plyBloxKit.EnDisableGameObject_plyBlock, plyBloxKit.Exit_plyBlock, plyBloxKit.GUI_Area_plyBlock, plyBloxKit.GUI_Button_plyBlock, plyBloxKit.GUI_Horizontal_plyBlock, plyBloxKit.GUI_RepeatButton_plyBlock, plyBloxKit.GUI_ScrollView_plyBlock, plyBloxKit.GUI_SelectionGrid_plyBlock, plyBloxKit.GUI_Toolbar_plyBlock, plyBloxKit.GUI_Vertical_plyBlock, plyBloxKit.GUI_Window_plyBlock, plyBloxKit.IfCondition_plyBlock, plyBloxKit.InstantiateObject_plyBlock, plyBloxKit.Light_SetColor_plyBlock, plyBloxKit.Light_SetIntensity_plyBlock, plyBloxKit.LoadLevel_plyBlock, plyBloxKit.LoadLevelAdd_plyBlock, plyBloxKit.LoopWith_plyBlock, plyBloxKit.Mecanim_Crossfade_plyBlock, plyBloxKit.Mecanim_Play_plyBlock, plyBloxKit.Mecanim_SetBoolParam_plyBlock, plyBloxKit.Mecanim_SetFloatParam_plyBlock, plyBloxKit.Mecanim_SetIntParam_plyBlock, plyBloxKit.Mecanim_SetSpeed_plyBlock, plyBloxKit.Mecanim_SetTriggerParam_plyBlock, plyBloxKit.ObjectLookAtLocation_plyBlock, plyBloxKit.ObjectLookAtObject_plyBlock, plyBloxKit.ObjectRotate_plyBlock, plyBloxKit.ObjectTranslate_plyBlock, plyBloxKit.OnGUI_Box_plyBlock, plyBloxKit.OnGUI_FlexibleSpace_plyBlock, plyBloxKit.OnGUI_HorizontalSlider_plyBlock, plyBloxKit.OnGUI_Label_plyBlock, plyBloxKit.OnGUI_PasswordField_plyBlock, plyBloxKit.OnGUI_SetBackgroundColor_plyBlock, plyBloxKit.OnGUI_SetChanged_plyBlock, plyBloxKit.OnGUI_SetColor_plyBlock, plyBloxKit.OnGUI_SetContentColor_plyBlock, plyBloxKit.OnGUI_SetDepth_plyBlock, plyBloxKit.OnGUI_SetEnabled_plyBlock, plyBloxKit.OnGUI_SetSkin_plyBlock, plyBloxKit.OnGUI_Space_plyBlock, plyBloxKit.OnGUI_TextArea_plyBlock, plyBloxKit.OnGUI_TextField_plyBlock, plyBloxKit.OnGUI_Toggle_plyBlock, plyBloxKit.OnGUI_VerticalSlider_plyBlock, plyBloxKit.PlayerPrefs_DeleteAll_plyBlock, plyBloxKit.PlayerPrefs_DeleteKey_plyBlock, plyBloxKit.PlayerPrefs_Save_plyBlock, plyBloxKit.PlayerPrefs_SetFloat_plyBlock, plyBloxKit.PlayerPrefs_SetInt_plyBlock, plyBloxKit.PlayerPrefs_SetString_plyBlock, plyBloxKit.plyValue_Block, plyBloxKit.RandomSeed_plyBlock, plyBloxKit.RepeatCountLoop_plyBlock, plyBloxKit.RunAfter_plyBlock, plyBloxKit.Screen_resSet2_plyBlock, plyBloxKit.Screen_resSet_plyBlock, plyBloxKit.Screen_setFullscreen_plyBlock, plyBloxKit.SendMessage_plyBlock, plyBloxKit.SendMessageUp_plyBlock, plyBloxKit.SetDirectionVector_plyBlock, plyBloxKit.SetGlobalVar_plyBlock, plyBloxKit.SetLocalVar_plyBlock, plyBloxKit.SetMeta_plyBlock, plyBloxKit.SetObjectParent_plyBlock, plyBloxKit.SetObjPropertyValue, plyBloxKit.SetPosition_plyBlock, plyBloxKit.SetRotation_plyBlock, plyBloxKit.SetScale_plyBlock, plyBloxKit.SetState_plyBlock, plyBloxKit.SetTempVar_plyBlock, plyBloxKit.TriggerEvent_plyBlock, plyBloxKit.WhileLoop_plyBlock, plyGame.Ac_Clear_plyBlock, plyGame.Ac_EquipItem_plyBlock, plyGame.Ac_EquipSkill_plyBlock, plyGame.Ac_SetBind_plyBlock, plyGame.Ac_Trigger_plyBlock, plyGame.Actor_Kill_plyBlock, plyGame.Actor_SetEssential_plyBlock, plyGame.ActorAttribute_Change_plyBlock, plyGame.ActorAttribute_Set_plyBlock, plyGame.ActorLevel_Set_plyBlock, plyGame.ActorSkill_Give_plyBlock, plyGame.ActorSkill_Remove_plyBlock, plyGame.ApplyResolution_plyBlock, plyGame.Bag_AddItem_plyBlock, plyGame.Bag_MaxWeightChange_plyBlock, plyGame.Bag_RemoveFromSlot_plyBlock, plyGame.Bag_RemoveItem_plyBlock, plyGame.Bag_UseFrom_plyBlock, plyGame.ChangeResolution_plyBlock, plyGame.Chara_BlendAnim_plyBlock, plyGame.Chara_GoIdle_plyBlock, plyGame.Chara_PlayAnim_plyBlock, plyGame.Chara_SetAniGroup_plyBlock, plyGame.Character_DisEnableControl_plyBlock, plyGame.Character_InteractWith_plyBlock, plyGame.Character_RequestLookAt_plyBlock, plyGame.Character_RequestMoveTo_plyBlock, plyGame.Character_SetSelected_plyBlock, plyGame.Character_Stop_plyBlock, plyGame.CharacterController_Move_plyBlock, plyGame.CharacterController_SimpleMove_plyBlock, plyGame.CharacterMoveSpeed_Set_plyBlock, plyGame.CharacterTurnSpeed_Set_plyBlock, plyGame.Currency_AddToBag_plyBlock, plyGame.Currency_RemoveFromBag_plyBlock, plyGame.Customize_ChangeCol_plyBlock, plyGame.Customize_ChangeMat_plyBlock, plyGame.Customize_ChangeObj_plyBlock, plyGame.Customize_ChangeTex_plyBlock, plyGame.Equip_Item_plyBlock, plyGame.Equip_Un_plyBlock, plyGame.Faction_SetStatus_plyBlock, plyGame.HideAllScreens_plyBlock, plyGame.HideCustomScreen_plyBlock, plyGame.HideLoadScreen_plyBlock, plyGame.InformScreensOfResChange_plyBlock, plyGame.Item_Create_plyBlock, plyGame.LoadSave_DeleteAll_plyBlock, plyGame.LoadSave_DeleteProfile_plyBlock, plyGame.LoadSave_DeleteSlot_plyBlock, plyGame.LoadSave_LoadGame_plyBlock, plyGame.LoadSave_ResetLastLoad_plyBlock, plyGame.LoadSave_SaveGame_plyBlock, plyGame.LoadSave_SetProfileIndex_plyBlock, plyGame.LoadSave_SetProfileName_plyBlock, plyGame.LoadSave_SetSlot_plyBlock, plyGame.Loot_Drop_plyBlock, plyGame.Marker_Add_plyBlock, plyGame.Marker_HideShow_plyBlock, plyGame.Marker_Remove_plyBlock, plyGame.NPC_SetIdle_Follow_plyBlock, plyGame.NPC_SetIdle_Patrol_plyBlock, plyGame.NPC_SetIdle_Stay_plyBlock, plyGame.NPC_SetIdle_Wander_plyBlock, plyGame.PlrMan_DestroyPlr_plyBlock, plyGame.PlrMan_SetActiveArt_plyBlock, plyGame.PlrMan_SetActiveChara_plyBlock, plyGame.PlrMan_SpawnPlr_plyBlock, plyGame.plyGame_Audio_ApplyVolumeChanges, plyGame.plyGame_Audio_ChangeVolume, plyGame.plyGame_Audio_Follow, plyGame.plyGame_Audio_PlayMusic, plyGame.plyGame_Audio_StopMusic, plyGame.plyGame_Audio_UpdateVolumes, plyGame.plyGame_Pause_plyBlock, plyGame.SaveScreenSettings_plyBlock, plyGame.ScreensEle_SetEnabled_plyBlock, plyGame.ScreensEle_SetImage_plyBlock, plyGame.ScreensEle_SetStyle_plyBlock, plyGame.ScreensEle_SetText_plyBlock, plyGame.ScreensEle_SetToggle_plyBlock, plyGame.ScreensEle_SetVisible_plyBlock, plyGame.SetFactionVar_plyBlock, plyGame.ShowCustomScreen_plyBlock, plyGame.ShowLoadScreen_plyBlock, plyGame.Skill_Use_plyBlock, and plyGame.StatusToPlayer_Set_plyBlock.

Public Member Functions

virtual void Created ()
 You can override this in custom Blocks. It is called at initialization so that the block can set some variables if it needs to and also check if most of its fields are in a valid state. It can set inValidState = true if the fields are valid and then use that in Run() to quickly check if the Block is in a valid state and allowed to actually run. This is called in the Blox object's Awake(), so do not reference objects that might not yet be available. More...
 
virtual void Initialise ()
 You can override this in custom Blocks. It is called at initialization so that the block can set some variables if it needs to and also check if most of its fields are in a valid state. It can set inValidState = true if the fields are valid and then use that in Run() to quickly check if the Block is in a valid state and allowed to actually run. Called in the Blox object's Start(), so do not reference objects that might not yet be available. Will not be called if blockIsValid = False More...
 
virtual BlockReturn Run (BlockReturn param)
 You can override this in custom Blocks. It is called when the Block should run. The return type is normally BlockReturn.OK except if it is a special case. The param will be be set to whatever the preceding block returned, that is if the return value was not a type that caused further block execution to stop. More...
 
BlockReturn RunChildren ()
 Called by container type blocks to run their contained (child) blocks. Will return BlockReturn type which should be checked by any looping Blocks to determine what they should do next. For example, Break, Continue, or execute the next block in the list normally. More...
 

Public Attributes

plyBlock next = null
 The block that follows on this one.
 
plyBlock prev = null
 The block preceding this one.
 
plyBlock owner = null
 The owner of this block if this block is in a container type block or used as a field in another block. Null if direct child of an Event.
 
plyBlock child = null
 The first child block of this block if it is a container type block and has child blocks. Used by blocks like 'Comment', 'If', and 'Else'.
 
bool active = true
 This tells whether the block is active or not. A disabled block will not execute at runtime. Note that blocks can't be enabled/ disabled at runtime. This can only be done in the Blox editor.
 
plyState owningState = null
 State that owns this block.
 
plyEvent owningEvent = null
 Event that owns this block.
 
plyBlox owningBlox = null
 Blox object that owns this block.
 
bool blockIsValid = true
 If set False then Run() of the Block will not be called. You need to init this to the correct state in Created() or Initialise(). Note that Initialise() will not be called if blockIsValid = false More...
 
bool stopAllOnError = true
 If True and blockIsValid = False or this Block's return code is Error then further execution of the Event this Block is in will stop immediately. Blocks that may be be in an invalid state but not really influence the flow of the Event, like a Block that starts an animation, would set this false since it does not matter too much if this kind of block failed. Variable and Condition type blocks should normally keep this to true since failure in them is important to take note of and should stop the flow of the event. More...
 
bool _ed_collapsed = false
 Ignore. This is an editor helper.
 
System.Reflection.FieldInfo[] _ed_fields = null
 Ignore. This is an editor helper.
 

Protected Member Functions

void Log (LogType logType, string message)
 Blocks should call this function when they want to print error messages as it will append some useful info to the message like the Blox, State and Event that this Blocks was used in. Will set blockIsValid = false; if logType = LogType.Error or LogType.Exception More...
 

Detailed Description

A plyBlock is the most basic of blocks and base class of other block types. A Block is something that is inserted into an Event and is what is executed when the Event is triggered. Have a look at plyBlockAttribute to learn more about the attribute (def.meta data) you need to include for any Block being defined. Also see plyBlockFieldAttribute for Block fields (public variables) that you define.

Member Function Documentation

virtual void plyBloxKit.plyBlock.Created ( )
virtual

You can override this in custom Blocks. It is called at initialization so that the block can set some variables if it needs to and also check if most of its fields are in a valid state. It can set inValidState = true if the fields are valid and then use that in Run() to quickly check if the Block is in a valid state and allowed to actually run. This is called in the Blox object's Awake(), so do not reference objects that might not yet be available.

virtual void plyBloxKit.plyBlock.Initialise ( )
virtual

You can override this in custom Blocks. It is called at initialization so that the block can set some variables if it needs to and also check if most of its fields are in a valid state. It can set inValidState = true if the fields are valid and then use that in Run() to quickly check if the Block is in a valid state and allowed to actually run. Called in the Blox object's Start(), so do not reference objects that might not yet be available. Will not be called if blockIsValid = False

void plyBloxKit.plyBlock.Log ( LogType  logType,
string  message 
)
protected

Blocks should call this function when they want to print error messages as it will append some useful info to the message like the Blox, State and Event that this Blocks was used in. Will set blockIsValid = false; if logType = LogType.Error or LogType.Exception

virtual BlockReturn plyBloxKit.plyBlock.Run ( BlockReturn  param)
virtual

You can override this in custom Blocks. It is called when the Block should run. The return type is normally BlockReturn.OK except if it is a special case. The param will be be set to whatever the preceding block returned, that is if the return value was not a type that caused further block execution to stop.

BlockReturn plyBloxKit.plyBlock.RunChildren ( )

Called by container type blocks to run their contained (child) blocks. Will return BlockReturn type which should be checked by any looping Blocks to determine what they should do next. For example, Break, Continue, or execute the next block in the list normally.

Member Data Documentation

bool plyBloxKit.plyBlock.blockIsValid = true

If set False then Run() of the Block will not be called. You need to init this to the correct state in Created() or Initialise(). Note that Initialise() will not be called if blockIsValid = false

bool plyBloxKit.plyBlock.stopAllOnError = true

If True and blockIsValid = False or this Block's return code is Error then further execution of the Event this Block is in will stop immediately. Blocks that may be be in an invalid state but not really influence the flow of the Event, like a Block that starts an animation, would set this false since it does not matter too much if this kind of block failed. Variable and Condition type blocks should normally keep this to true since failure in them is important to take note of and should stop the flow of the event.