![]() |
TilePlus Version 5
Unity3D Tilemap Extension
|
This is a sub-object to be added to Event and/or Zone actions. This can be used as a base class. The implementation here plays a sequence. More...


Public Member Functions | |
| long | PlaySequence (TilePlusBase tile, bool relative=true, int[]? indices=null, int numLoops=-1, Action< TpTweenSequence, bool >? onFinished=null, Action< TpTweenSequence, TpTween >? onNextTween=null, bool evenIfAlreadyRunning=false) |
| Play a sequence using a TweenSpec asset referenced by this S.O. | |
Public Attributes | |
| TpTweenSpec? | m_TpTweenSpec |
| A tween-spec asset ref. | |
This is a sub-object to be added to Event and/or Zone actions. This can be used as a base class. The implementation here plays a sequence.
///
You don’t want to maintain state of any kind in an TweenerSubObject asset’s code unless you use it with only ONE tile asset. Similarly to other assets, changing serialized values in these assets in Editor-Play mode can cause all sorts of issues.
NOTE that for this subobject to be inspectable in Painter or Tile+Brush Selection Inspector, the TptShowObjectField attr in the tile must have the m_HasSubasset param true. Event and Zone Actions added in the TilePlusBase section of the Selection Inspector do this automatically. However, the Event or Zone action MUST implement ScriptableObject? IActionPlugin.InspectableObject from the IActionPlugin interface. The base classes TpTileZoneAction and TpTileEventAction already do this. Hence, normally this just works automatically, however if you're providing a different implementation somehow, this info may be useful! /remarks>
| long TilePlus.TpTweenerSubObject.PlaySequence | ( | TilePlusBase | tile, |
| bool | relative = true, | ||
| int ?[] | indices = null, | ||
| int | numLoops = -1, | ||
| Action< TpTweenSequence, bool >? | onFinished = null, | ||
| Action< TpTweenSequence, TpTween >? | onNextTween = null, | ||
| bool | evenIfAlreadyRunning = false ) |
Play a sequence using a TweenSpec asset referenced by this S.O.
| tile | parent tile. |
| relative | If true, the tweenSpec params are modified to use the initial conditions of the item being tweened. EG, if SCALE is being tweened, the EndValue is modified to reflect the initial SCALE of the tile's sprite. This only applies to SCALE, POSITION, and ROTATION. |
| indices | an array of indices into the Tween spec list. If not null, this array of indices is used to choose tweens (in the order you specify) in a sequence. If null, ALL of the items in the tweenSpec are used. If an index is out of range then it is silently ignored. |
///
| numLoops | number of loops (default = -1 which is infinite repeat. |
| onFinished | OnFinished callback |
| onNextTween | OnNextTween callback |
| evenIfAlreadyRunning | Normally this SubObj won't start a sequence if there's already one running for this tile. Set this true if you don't care about that. |
| TpTweenSpec? TilePlus.TpTweenerSubObject.m_TpTweenSpec |
A tween-spec asset ref.