Show / Hide Table of Contents

    Class MapExtensions

    Helper class for extension methods of the map.

    Inheritance
    System.Object
    MapExtensions
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Fibula.Mechanics.Contracts.Extensions
    Assembly: Fibula.Mechanics.Contracts.dll
    Syntax
    public static class MapExtensions

    Methods

    | Improve this Doc View Source

    AreInLineOfSight(IMap, Location, Location)

    Checks if two map locations are line of sight.

    Declaration
    public static bool AreInLineOfSight(this IMap map, Location firstLocation, Location secondLocation)
    Parameters
    Type Name Description
    IMap map

    A reference to the map.

    Location firstLocation

    The first location.

    Location secondLocation

    The second location.

    Returns
    Type Description
    System.Boolean

    True if the second location is considered within the line of sight of the first location, false otherwise.

    | Improve this Doc View Source

    CanThrowBetweenLocations(IMap, Location, Location, Boolean)

    Checks if a throw between two map locations is valid.

    Declaration
    public static bool CanThrowBetweenLocations(this IMap map, Location fromLocation, Location toLocation, bool checkLineOfSight = true)
    Parameters
    Type Name Description
    IMap map

    A reference to the map.

    Location fromLocation

    The first location.

    Location toLocation

    The second location.

    System.Boolean checkLineOfSight

    Optional. A value indicating whether to consider line of sight.

    Returns
    Type Description
    System.Boolean

    True if the throw is valid, false otherwise.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2020 | The Fibula Project
    Generated using DocFX | Jose L. Nuñez de Caceres et al.