|
| override bool | StartUp (Vector3Int position, ITilemap tilemap, GameObject go) |
| void | SetChar (char c, int offset=32) |
| | Set value as a character. ASCII space thru tilde (32-127) Not part of the ITpUiControl but faster than passing one-char string to SetValue(string)
|
| bool | ChooseSlideShow (string selectedName, bool forceRefresh=true, bool ignoreNullSelectedName=false) |
| | Choose current slide show by name.
|
| override bool | StartUp (Vector3Int position, ITilemap tilemap, GameObject go) |
| | StartUp for TpSlideShow.
|
| void | SetSlide (int index) |
| | Directly set the slide index. DOES NOT ISSUE ANY EVENTS.
|
| void | ChangeSlide (bool forward, bool execZoneActions=true, bool emitEvents=true) |
| | Use this to change the slide. EMIT events or exec ZoneAction if appropriate.
|
| void | ChangeClipSet (bool forward) |
| | Advance to the next clip or go back to the previous clip. No wrap-around.
|
| override void | GetTileData (Vector3Int position, ITilemap tilemap, ref TileData tileData) |
| | Get data for this tile. Override of Tile. Note that Tilemap.RefreshTile calls this.
|
| override bool | GetTileAnimationData (Vector3Int position, ITilemap tilemap, ref TileAnimationData tileAnimationData) |
| override bool | UpdateInstance (string[] value) |
| | Default inplementation of UpdateInstance.an array of field names that have been changed in the Editor via the ImGuiTileEditor module
|
| override bool | StartUp (Vector3Int position, ITilemap tilemap, GameObject go) |
| | Tiles can be in three states: Asset, Clone, Locked. See the Programmer's Guide for more info. NOTE: if overriding this BE SURE to call this base method as the FIRST thing you do! Note the return value and return FALSE if this base method returns FALSE.
|
| override void | GetTileData (Vector3Int position, ITilemap tilemap, ref TileData tileData) |
| | Get data for this tile. Override of Tile. Note that Tilemap.RefreshTile calls this.
|
| virtual void | CleanUp () |
| | Implement to perform cleanup. RequiresCleanup
|
| override string | ToString () |
| virtual void | ResetState (TileResetOperation op) |
| | Used to reset state variables. May need overriding in subclasses. See programmer's guide for info on overriding this.
|
| virtual void | ActivateAnimation (bool turnOn, int startingFrame=0, bool ignoreRewindingState=false) |
| | Turn animation on/off for tiles which support it.- Parameters
-
| turnOn | true/false = on/off |
| startingFrame | sets the current frame to 0 (for either operation). Use -1 to inhibit. |
| ignoreRewindingState | if false(default) then this method does not execute when waiting for a rewind - only when one-shot is used w/rewindAfterOneShot set true |
Also see AnimationSupported property. Also, when turnOn==true, the startingFrame is set prior to starting animation. When false, the startingFrame is set after stopping the animation
|
| virtual void | PauseAnimation (bool pause) |
| | Pause a running animation.- Parameters
-
|
| virtual void | LoopEndedCallback () |
| | Loop-ended callback handler (originates from Tilemap component)
|
| bool | ExecEventAction (UnityEngine.Object? obj) |
| | Exec the event action, if any.
|
| void | MessageTarget (T sentPacket) |
| | Send a message of type T.
|
| bool | CanAcceptMessage () |
| | Optional "are you ready?" method that can be used in filtering prior to sending a message. Useful in some edge cases. Override in implementation if necc. NOTE this is NOT checked internally somehow. You have to use a filter and test this.
|
| void | RestoreSaveData (T dataToRestore) |
| | Implement to be sent data to restore.
|
|
| char | GetChar [get] |
| | Get the displayed character as a UNICODE character. Assumes ASCII mode.
|
| bool | ShowZoneTargetTagField [get] |
| int | CurrentClipNumberOfSlides [get] |
| | Property to get the currently-selected clip's number of slides. Returns -1 when unitialized.
|
| string | SlideShowName [get] |
| | Property to get current slide show name from clip asset.
|
| int | NumberOfSlideShows [get] |
| | Property to get number of slide shows in asset.
|
| int | CurrentSlideIndex [get] |
| | Convenience property for slide index - avoids accessing SlideIndex, below.
|
| int | SlideIndex [get, set] |
| | The index of the current sprite. Normally, change slides with SetSlide, or ChangeSlide not this. But if you want to, please ensure that you check the CurrentSlideIndex if you want to avoid wrap-around or nothing happening because you're at the zeroth or last slide. Note that you CAN use SlideIndex++ or SlideIndex– but be aware of wrapping behaviour.
|
| bool | ValidSlideShow [get] |
| | True if there's a clipset with > 0 clips.
|
| bool | AcceptsZoneAction [get] |
| | Property required by IZoneActionTarget I/F.
|
| bool | SetSlideOnStart = true [get, set] |
| | A subclass can set this true in its StartUp to inhibit automatically setting the slide using SlideIndexAtStart.
|
| virtual bool | AllowsRestore [get] |
| | Implementations may set this false if either data has already been restored OR if it doesn't want data restoration at all. New in 3.1.
|
| bool | SpriteShouldBeCleared [get] |
| | Returns true if tile sprite should be cleared based on setting of TileSpriteClear field, tile state, and whether in Play mode or not.
|
| byte?[] | TileGuidBytes [get, set] |
| | The clone's GUID. Note that IDs are individual for each clone. This value can only be set once. Calling ResetState allows it to be changed until the next StartUp. If a new GUID isn't added before StartUp then that method will add it. For example: see TpLib.CopyAndPasteTile Note: generally speaking, don't reset the GUID.
|
| string | TileName [get] |
| TilePlusBase | ThisTileInstance [get] |
| | Get the tile's instance thru this interface.
|
| int | Id [get] |
| | Id of tile. Nominally GetInstanceId. Default returns 0.
|
| bool | GetTileDataHasRun [get] |
| | TRUE if GetTileData has run. If this is false when TpLib.RegisterTilePlus is executed then TpLib checks to see if the tile's sprite needs to be affected. See that code for an explanation.
|
| static Vector3Int | ImpossibleGridPosition = new(int.MinValue, int.MinValue, int.MinValue) [get] |
| | No tile will ever be here!
|
| Vector3Int | TileGridPosition [get] |
| | This is the tile grid position as set from StartUp. Intentionally non-virtual. Does not need (and should not have) serialized backing field. Note that backing field is initialized to "Impossible Grid Position".
|
| Vector3 | TileWorldPosition [get] |
| | Handy property to get the world position from the TileGridPosition property. returns Vector3.negativeInfinity for error SO CHECK FOR THAT! note: returns cell center as world position.
|
| Vector3Int | LastTileGridPosition [get] |
| | Get the last tile grid position Note that backing field is initialized to "Impossible Grid Position".
|
| Tilemap? | LastParentTilemap [get] |
| | Get the last parent Tilemap. Note that backing firld is initialized to NULL.
|
| bool | TileGridPosHasChanged [get] |
| | Has the tile position changed since the last StartUp?
|
| bool | ParentTilemapHasChanged [get] |
| | Has the tile's parent tilemap changed since the last StartUp?
|
| Tilemap? | ParentTilemap [get] |
| | Parent tilemap for this tile (set in clone). Intentionally non-virtual. Does not need (and should not have) serialized backing field.
|
| int | ParentTilemapInstanceId [get] |
| | The instance ID of the parent tilemap.
|
| bool | AnimationIsPaused [get] |
| | Property to determine if animation is PAUSED.
|
| virtual bool | IsOneShotWaitingToRewind [get] |
| | Override in any animated tiles.
|
| bool | TileAnimationActive [get] |
| | Property to determine if animation is running in the tile. Note: running=true and paused=true is fine.
|
| bool | AnimationIsRunning [get] |
| | Property to determine if Tile animation is ACTIVE and not paused: IE actual animation is running.
|
| bool | IsClone [get] |
| | Is this a clone? Read-only.
|
| bool | IsAsset [get] |
| | Is this an asset? Read-only.
|
| bool | IsLocked [get] |
| | Is this a locked tile? Read-only.
|
| bool | IsPaletteTile [get, set] |
| | Valid only in-editor, is this tile from the Palette?
|
| string | TileStateString [get] |
| | String version of TileState.
|
| Guid | TileGuid [get] |
| | Get the tile's GUID as a GUID struct.
|
| string | TileGuidString [get] |
| | The clone's GUID as a string.
|
| int string[] tags | TrimmedTags [get] |
| virtual bool | RequiresCleanup [get] |
| | If a particular tile requires special cleanup prior to deletion, EXPLICITLY implement this method and return TRUE. TpZoneAnimator
|
| bool | SanityCheck [get] |
| | If handling an animation callback, this is useful to ensure that the TPT tile instance is actually still attached to a Tilemap and not just transiently sitting in memory (ie deleted but not yet purged from a List or HashSet somewhere.
|
| static TpTweener | TweenerService [get] |
| | GET a reference to the tweener service. It's only used by TilePlus tiles.
|
| virtual ColliderMode | TileColliderMode [get, set] |
| | Used to set up the tile's collider.
|
| SpriteClearMode | TileSpriteClear [get, set] |
| | Get the the tile sprite clear mode.
|
| string | Tag [get, set] |
| | Property to get the optional tag.
|
| OversizeSpriteMode | OversizeSpriteMode [get] |
| | This is used by the PositionDb to calculate the actual size of a sprite when determining if a position is occupied.
|
| Vector2 | SpriteSize [get] |
| | What is the size of the sprite? Override when implementing OversizeSpriteMode.
|
| TpTileEventAction? | EventAction [get] |
| | A TpTileEventAction.
|
| virtual ? object | EventActionObject [get, set] |
| TpTileZoneAction? | ZoneAction [get] |
| | A TpTileZoneAction.
|
| BoundsInt | ZoneBoundsInt [get, set] |
| | The BoundsInt for the zone.
|
| Bounds | ZoneBounds [get] |
| | A bounds based on the ZoneBoundsInt.
|
| Scene | ParentScene [get] |
| | Return the scene that the Tile is in. Only works on a placed tile; on a non-cloned tile it should return default Note: check the return value for Scene.IsValid.
|
| bool | IsComputeOnly [get] |
| | Indicate that this tile is 'compute only'.
|
| GameObject? | InstantiatedGameObject [get] |
| | Get the GameObject of the tile. Convenience, saves casting in editors.
|
| bool | AnimationSupported [get] |
| | This tile supports animation if true.
|
| bool | AllowsSave [get] |
| | Implementations may set this false if nothing has changed in the tile. That avoids saving data from this tile if nothing has changed since instantiaton. Default is true; New in 3.1.
|
|
| enum | WrapOverride { None
, ForceWrap
, ForceHalt
} |
| | Wrapping override control. More...
|
| TpSlideShowSpriteSet? | m_SlidesClipSet |
| | Slide clip asset.
|
| string | m_SlideshowAtStart = "default" |
| | Default slideshow sequence.
|
| int | m_SlideIndexAtStart |
| | Default start index.
|
| bool | m_TriggerOnValueChange |
| | if true, emits a trigger event when the slide index changes from an incoming message
|
| bool | m_AcceptsClicks = true |
| | If true, ActionToTilePacket messages are accepted.
|
| ObjectPacket.ZoneCapability | m_ZoneCapability |
| | determines how messaging other tiles works.
|
| string | m_ZoneTargetTag = string.Empty |
| | Optional tag field for target. Only appears if zonecapability is SendOnValueChange.
|
| WrapOverride | m_WrappingOverride = WrapOverride.None |
| | Allow overriding wrap/limit setting from slideshow-sprites asset.
|
| int | count |
| | Property to get a tuple of (count, array of individually-trimmed tags). not cached.
|
| ColliderMode | m_ColliderMode = ColliderMode.NoCollider |
| | Used to set up the tile's collider.
|
| SpriteClearMode | m_TileSpriteClear = SpriteClearMode.Ignore |
| | m_TileClear controls whether or not the tile's sprite is cleared or if the tile is deleted at runtime, or nothing.
|
| string | m_Tag = string.Empty |
| | The tag for this tile.
|
| OversizeSpriteMode | m_OversizeSpriteMode = OversizeSpriteMode.Ignore |
| | How to handle oversize sprite recognition.
|
| Vector2 | m_SpriteSize = Vector2.one |
| | The true size of the tile sprite. See Oversize Sprite Mode.
|
| TpTileEventAction? | m_EventAction |
| | TpTileEventAction project asset reference. May be null.
|
| TpTileZoneAction? | m_ZoneAction |
| | TpTileZoneAction project asset reference. May be null.
|
| bool | m_ZoneIsInUse = false |
| | Zone capabilities active.
|
| int | count |
| | Property to get an array of individually-trimmed tags.
|
| void | SetColliderType (ref TileData tileData) |
| | Sets up colliders.
|
| Vector3Int | m_TileGridPosition = new(int.MinValue, int.MinValue, int.MinValue) |
| | The tile grid position gets initialized in Startup. It's initialized with 'ImpossibleGridPosition'.
|
| Vector3Int | m_LastTileGridPosition = new(int.MinValue, int.MinValue, int.MinValue) |
| | The previous tile grid position.
|
| Tilemap? | m_LastParentMap |
| | The previous parent Tilemap.
|
| bool | m_TileGridPosHasChanged |
| | True if the tile grid position has changed.
|
| bool | m_ParentTilemapHasChanged |
| | Parent tilemap has changed if true.
|
| Tilemap? | m_ParentTilemap |
| | Parent tile map is initialized in Startup.
|
| BoundsInt | m_ZoneBoundsInt = new(Vector3Int.zero,new Vector3Int(3,3,1)) |
| | BoundsInt of trigger zone. Initialized to a 3x3 area centered at the Tile's location.
|
Tile that shows ASCII characters (i=32 and up)
It's important that the slide set has a space as its first element.