A packet used to tell a tile that a user has clicked on it. See TpInputActionToTile component and TpActionToTile S.O. classes.
More...
|
| | ActionToTilePacket (Object? sourceInstance=null) |
| | Use this for pooling or creating an empty instance. Not necc to provide a sourceInstance value. This artifice is required because the base class doesn't have (nor can have) a parameterless constructor.
|
| override void | Reset () |
| | Reset this instance. Note is invoked when instance returned to pool.
|
| override string | ToString () |
|
| object? | Data [get, set] |
| | Arbitrary data, can be null.
|
| TpTileUtils.DirectionType8 | ClickZone8 = TpTileUtils.DirectionType8.None [get, set] |
| | If enabled by TpActionToTile.ComputeDirectionOffsets8 == true then 8-way direction info is added to this packet. See TpActionToTile
|
| TpTileUtils.DirectionType4 | ClickZone4 = TpTileUtils.DirectionType4.None [get, set] |
| | If enabled by TpActionToTile.ComputeDirectionOffsets4 == true then 4-way direction info is added to this packet. See TpActionToTile
|
| TpActionToTile? | ActionToTile [get, set] |
| | A reference to the TpActionToTile instance which created the packet.
|
| Vector2 | OffsetFromGridPosition [get, set] |
| | Offset of world position from Grid position.
|
| bool | PostEvent [get, set] |
| | The tile should emit an event if it's set up for that.
|
| float | Delay [get, set] |
| | Add a delay before execution. Implementation-dependent. Useful when relaying packets to other tiles if you don't want them to be operated on immediately. See ODD_ToggleZoneAction for an example.
|
| InputAction.? CallbackContext | InputActionContext [get, set] |
| | Input action context, get name, type of event etc. NOTE THAT PER UNITY DOCS you can't keep a ref to this outside of a local scope.
|
| bool | HoverEvent [get, set] |
| | True if event is Hover.
|
| bool | HoverCompleted [get, set] |
| | True if the Hover Grid pos has changed. Target should end hover effect.
|
| Object? | SourceInstance [get, set] |
| | The instance that's the source of the message. Can be null.
|
| ulong | Id [get, set] |
| | The ID of this packet. Packet recepients can test this to see if they're being sent the same message repeatedly. Note that 0 is not used except internally.
|
A packet used to tell a tile that a user has clicked on it. See TpInputActionToTile component and TpActionToTile S.O. classes.
Requires NewInputSystem
◆ ActionToTilePacket()
| TilePlus.ActionToTilePacket.ActionToTilePacket |
( |
Object? | sourceInstance = null | ) |
|
Use this for pooling or creating an empty instance. Not necc to provide a sourceInstance value. This artifice is required because the base class doesn't have (nor can have) a parameterless constructor.
Use this for creating a new instance when pooling. Note that you have to use the properties if you want something useful! ENSURE THAT SOURCEINSTANCE is UPDATED!
◆ Reset()
| override void TilePlus.ActionToTilePacket.Reset |
( |
| ) |
|
|
virtual |
◆ ToString()
| override string TilePlus.ActionToTilePacket.ToString |
( |
| ) |
|
◆ ActionToTile
| TpActionToTile? TilePlus.ActionToTilePacket.ActionToTile |
|
getset |
A reference to the TpActionToTile instance which created the packet.
◆ ClickZone4
If enabled by TpActionToTile.ComputeDirectionOffsets4 == true then 4-way direction info is added to this packet. See TpActionToTile
◆ ClickZone8
If enabled by TpActionToTile.ComputeDirectionOffsets8 == true then 8-way direction info is added to this packet. See TpActionToTile
◆ Data
| object? TilePlus.ActionToTilePacket.Data |
|
getset |
Arbitrary data, can be null.
◆ Delay
| float TilePlus.ActionToTilePacket.Delay |
|
getset |
Add a delay before execution. Implementation-dependent. Useful when relaying packets to other tiles if you don't want them to be operated on immediately. See ODD_ToggleZoneAction for an example.
◆ HoverCompleted
| bool TilePlus.ActionToTilePacket.HoverCompleted |
|
getset |
True if the Hover Grid pos has changed. Target should end hover effect.
◆ HoverEvent
| bool TilePlus.ActionToTilePacket.HoverEvent |
|
getset |
◆ InputActionContext
| InputAction.? CallbackContext TilePlus.ActionToTilePacket.InputActionContext |
|
getset |
Input action context, get name, type of event etc. NOTE THAT PER UNITY DOCS you can't keep a ref to this outside of a local scope.
◆ OffsetFromGridPosition
| Vector2 TilePlus.ActionToTilePacket.OffsetFromGridPosition |
|
getset |
Offset of world position from Grid position.
example: if world pos is (1.4, 1.5) then grid pos is (1,1) and offset is (0.4, 0.5).
Useful to determine mouse position within the grid position.
◆ PostEvent
| bool TilePlus.ActionToTilePacket.PostEvent |
|
getset |
The tile should emit an event if it's set up for that.
The documentation for this class was generated from the following file:
- /Users/jms/Documents/Tpt_55/TPT55/Assets/Plugins/TilePlus/Runtime/StaticLib/ClassesEnums/MessagingClasses.cs