示例#1
0
    static int GetTileFlags(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 2);
            UnityEngine.Tilemaps.Tilemap obj  = (UnityEngine.Tilemaps.Tilemap)ToLua.CheckObject(L, 1, typeof(UnityEngine.Tilemaps.Tilemap));
            UnityEngine.Vector3Int       arg0 = StackTraits <UnityEngine.Vector3Int> .Check(L, 2);

            UnityEngine.Tilemaps.TileFlags o = obj.GetTileFlags(arg0);
            ToLua.Push(L, o);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
示例#2
0
        private static void SetColor(UnityEngine.Tilemaps.Tilemap tilemap, Vector3Int position, Color color)
        {
            TileBase tile = tilemap.GetTile(position);

            if (tile != null)
            {
                if ((tilemap.GetTileFlags(position) & TileFlags.LockColor) != 0)
                {
                    if (tile is Tile)
                    {
                        Debug.LogWarning("Tint brush cancelled, because Tile (" + tile.name + ") has TileFlags.LockColor set. Unlock it from the Tile asset debug inspector.");
                    }
                    else
                    {
                        Debug.LogWarning("Tint brush cancelled. because Tile (" + tile.name + ") has TileFlags.LockColor set. Unset it in GetTileData().");
                    }
                }

                tilemap.SetColor(position, color);
            }
        }
示例#3
0
 public virtual TileFlags GetTileFlags(Vector3Int position)
 {
     return(m_Tilemap.GetTileFlags(position));
 }