A block that creates and can return a Rect value. More...
Inherits plyBloxKit.plyValue_Block.
Inherited by plyBloxKit.AsRect_plyBlock, plyBloxKit.GetGlobalVar_asRect_plyBlock, plyBloxKit.GetLocalVar_asRect_plyBlock, plyBloxKit.GetMeta_asRect_plyBlock, plyBloxKit.GetTempVar_asRect_plyBlock, plyBloxKit.RectFromXYWH_plyBlock, and plyGame.GetFactionVar_asRect_plyBlock.
Public Member Functions | |
Rect | RunAndGetRect () |
Executes and return value. More... | |
override object | RunAndGetValue () |
Executes and return value. More... | |
override string | ToString () |
![]() | |
override void | Created () |
![]() | |
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 | |
Rect | value = new Rect() |
current value of the variable block | |
![]() | |
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. | |
Additional Inherited Members | |
![]() | |
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... | |
A block that creates and can return a Rect value.
Rect plyBloxKit.Rect_Value.RunAndGetRect | ( | ) |
Executes and return value.
|
virtual |
Executes and return value.
Reimplemented from plyBloxKit.plyValue_Block.