コード例 #1
0
    ///Cross-matrix edition of <see cref="Matrix.IsPassableAt(UnityEngine.Vector3Int,UnityEngine.Vector3Int,bool,GameObject)"/>
    ///<inheritdoc cref="Matrix.IsPassableAt(UnityEngine.Vector3Int,UnityEngine.Vector3Int,bool,GameObject)"/>
    /// FIXME: not truly cross-matrix. can walk diagonally between matrices
    public static bool IsPassableAt(Vector3Int worldOrigin, Vector3Int worldTarget, CollisionType collisionType = CollisionType.Player, bool includingPlayers = true, GameObject context = null, int[] excludeList = null)
    {
        // Gets the list of Matrixes to actually check
        MatrixInfo[] includeList = excludeList != null?MatrixManager.ExcludeFromAllMatrixes(MatrixManager.GetList(excludeList)) : Instance.ActiveMatrices;

        return(isAtInternal(mat => mat.Matrix.IsPassableAt(WorldToLocalInt(worldOrigin, mat),
                                                           WorldToLocalInt(worldTarget, mat), collisionType: collisionType, includingPlayers: includingPlayers, context: context), includeList));
    }