Exemple #1
0
 public override void Paint(GridLayout gridLayout, GameObject brushTarget, Vector3Int position)
 {
     if (BackTilemap != null && ForeTilemap != null)
     {
         var bp = new Vector3Int(position.x + BackOffset.x, position.y + BackOffset.y, position.z);
         BackTilemap.SetTile(bp, Back);
         BackTilemap.SetTransformMatrix(bp, Matrix4x4.identity);
         var fp = new Vector3Int(position.x + ForeOffset.x, position.y + ForeOffset.y, position.z);
         ForeTilemap.SetTile(fp, Fore);
         ForeTilemap.SetTransformMatrix(fp, Matrix4x4.identity);
     }
 }
Exemple #2
0
    static int SetTransformMatrix(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 3);
            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.Matrix4x4 arg1 = StackTraits <UnityEngine.Matrix4x4> .Check(L, 3);

            obj.SetTransformMatrix(arg0, arg1);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }