Skip to main content

Others

These are mostly for internal use.

IActionPlugin

Used with ZoneActions and EventActions to provide a way to have a second asset (typ, a Scriptable Obj but can be any UnityEngine.Object) be inspectable thru the IMGUI tile editor (selection inspector).

Note that the asset ought to be a PROJECT asset and NOT a SCENE object, although this is not enforced or checked.

IHoverableControl

This is used to mark a tile as a 'Hover Zone', that is, a tile which accepts zone-based hover events. This interface inherits from ITpMessaging<BoolPacket> and the MessageTarget for a BoolPacket must be implemented. See the UiHoverZone script for an example.

When a tile implements this interface (and it is on the SINGLE tilemap used for Hoverable controls) it gets messaged with a BoolPacket (a small class with a boolean value in it) when the zone as described by tile's ZoneBoundsInt (part of every TilePlus tile) when the Zone is entered and exited.

Basically, for Hover Zones the zone is set (as usual) within the HoverZone tile to encompass whatever area you want. When that area is entered, a BoolPacket is sent with the value = true and when the area is exited the packet is sent with the value = true. The HoverZone tile uses this to do whatever it wants; typically the tile will invoke a ZoneAction S.O. which can do whatever arbitrary task you want. As set up in the UI demo they're used for tooltips.

IScriptableService

This is used by TpLib's Update dispatcher and by the ServiceManager. See Services.

ITpSpawnUtilClient

This is used by TPT tiles that wish to use the spawner in a particular way. You'll never need it but you can see how it's used in TpAnimZoneSpawner and TpAnimatedSpawner.

ItpUiControl

This provides a Type-independent way of communicating with the TPT UI-variety tiles.

IZoneActionTarget

This interface is applied to tiles that can be targets of Zone Actions. Zone Actions may re-transmit TpMessaging messages to other tiles, but always should test this interface to see if the tile wants to accept such messages. See the Zone Actions chapter.