예제 #1
0
    public static bool IsPassable(params BasicTile[] tile)
    {
        for (var i = 0; i < tile.Length; i++)
        {
            BasicTile t = tile[i];
            if (t && !t.IsPassable())
            {
                return(false);
            }
        }

        return(true);
    }
예제 #2
0
        public virtual bool IsPassableAt(Vector3Int position)
        {
            BasicTile tile = tilemap.GetTile <BasicTile>(position);

            return(!tile || tile.IsPassable());
        }
예제 #3
0
        public virtual bool IsPassableAt(Vector3Int from, Vector3Int to)
        {
            BasicTile tileTo = tilemap.GetTile <BasicTile>(to);

            return(!tileTo || tileTo.IsPassable());
        }