TilePlus Version 5
Unity3D Tilemap Extension
Loading...
Searching...
No Matches
TilePlus.TpZoneActionRadio Class Reference

Customized Zone Action to implement Radio Buttons. More...

Inheritance diagram for TilePlus.TpZoneActionRadio:
Collaboration diagram for TilePlus.TpZoneActionRadio:

Public Member Functions

override bool Exec (TilePlusBase sourceInstance, Type? targetType, string tagString, ObjectPacket.EventsPropagationMode eventPropagationMode=ObjectPacket.EventsPropagationMode.None, string optionalString="", int optionalInt=0, bool optionalBool=false, object? optionalObject=null)
 This ZoneAction emulates a RadioButton set in one of two mutually exclusive ways:

Additional Inherited Members

Public Attributes inherited from TilePlus.TpTileZoneAction
ScriptableObject? m_Subasset
 A subasset: optional.
Static Public Attributes inherited from TilePlus.TpTileZoneAction
const string Command_ZoneAction = "ZONE_ACTION"
 Name used for info string in the ObjectPacket sent to targets.

Detailed Description

Customized Zone Action to implement Radio Buttons.

Member Function Documentation

◆ Exec()

override bool TilePlus.TpZoneActionRadio.Exec ( TilePlusBase sourceInstance,
Type? targetType,
string tagString,
ObjectPacket.EventsPropagationMode eventPropagationMode = ObjectPacket::EventsPropagationMode::None,
string optionalString = "",
int optionalInt = 0,
bool optionalBool = false,
object? optionalObject = null )
virtual

This ZoneAction emulates a RadioButton set in one of two mutually exclusive ways:

  1. If there's a tag then tiles with a matching tag are messaged.
  2. If there's no tag then the zone is used.

Use whatever method works for you. If the tiles are more-or-less adjacent use a zone. If they're not, use tags. It only works if the target and source are both UiControls derived from TpSlideShow.

Messages other tiles. Fetches the Zone Bounds from a tile. Messages tiles which implement IZoneActionTarget, and have an explicit implementation of an ObjectPacket message target. Note the different way that the 'zone' is used. For TpZoneSlideShow the zone is used to demark which tiles will be messaged. For others, such as TpZoneAnimator or TpAnimZoneLoader or TpAnimZoneSpawner, the zone is used to detect when a supplied grid coordinate is contained within the zone with the intent of some sort of state change.

Parameters
sourceInstanceTilePlus tile that's calling this method
tagStringoptional tags for targets
targetTypeType of tile to target. If null, all types.
optionalStringOptional string value for packet
optionalIntOptional int value for packet
optionalBoolOptional bool value for packet.
eventPropagationModehow receipients of the messages sent by this should or should not propagate the event.
optionalObjectoptional object value for packet.
This version messages tiles with an ObjectPacket message target, and targets MUST implement the IZoneActionReceiver interface. That allows individual tile instances to opt out of being sent messages.

Reimplemented from TilePlus.TpTileZoneAction.


The documentation for this class was generated from the following file: