Skip to content

Commit

Permalink
feat: Added 4 new convenience values to the TileInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammin committed May 18, 2024
1 parent d4601b2 commit 19f2de4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Assets/LDtkUnity/Runtime/Data/Extensions/Instance/TileInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,30 @@ namespace LDtkUnity
{
public partial class TileInstance
{
/// <value>
/// Reference of this tile's rule definition, only for AutoLayers!<br/>
/// Make sure to call <see cref="LDtkUidBank"/>.<see cref="LDtkUidBank.CacheUidData"/> first!
/// </value>
[IgnoreDataMember] public AutoLayerRuleDefinition AutoLayerRuleDefinition => LDtkUidBank.GetUidData<AutoLayerRuleDefinition>(AutoLayerRuleId);

/// <value>
/// Rule definition uid.<br/>
/// Ensure to get this value from an auto layer context!
/// </value>
[IgnoreDataMember] public int AutoLayerRuleId => D[0];

/// <value>
/// The cell ID of this tile, much like the tile ID in a tileset.
/// Ensure to get this value from an auto layer context!
/// </value>
[IgnoreDataMember] public int AutoLayerCoordId => D[1];

/// <value>
/// The cell ID of this tile, much like the tile ID in a tileset.
/// Ensure to get this value from a tile layer context!
/// </value>
[IgnoreDataMember] public int TileLayerCoordId => D[0];

/// <value>
/// X mirror transformation of the tile
/// </value>
Expand Down

0 comments on commit 19f2de4

Please sign in to comment.