Struct GoalMapWeightPair
Assembly: GoRogue.dll
Syntax
public readonly struct GoalMapWeightPair : IEquatable<GoalMapWeightPair>, IMatchable<GoalMapWeightPair>
Constructors
View Source
GoalMapWeightPair(IGridView<double?>, double)
Declaration
public GoalMapWeightPair(IGridView<double?> goalMap, double weight)
Parameters
Type |
Name |
Description |
IGridView<double?> |
goalMap |
The goal map.
|
double |
weight |
Weight for the specified goal map.
|
Fields
View Source
GoalMap
Declaration
public readonly IGridView<double?> GoalMap
Field Value
View Source
Weight
The weight of the specified goal map.
Declaration
public readonly double Weight
Field Value
Methods
View Source
Deconstruct(out IGridView<double?>, out double)
Supports C# Deconstruction syntax.
Declaration
public void Deconstruct(out IGridView<double?> goalMap, out double weight)
Parameters
View Source
Equals(GoalMapWeightPair)
True if the given pair has the same component type and tag; false otherwise.
Declaration
public bool Equals(GoalMapWeightPair other)
Parameters
Returns
View Source
Equals(object?)
True if the given object is a GoalMapWeightPair and has the same goal map and weight; false otherwise.
Declaration
public override bool Equals(object? obj)
Parameters
Type |
Name |
Description |
object |
obj |
|
Returns
Overrides
View Source
FromTuple((IGridView<double?> goalMap, double weight))
Converts the tuple to an equivalent ComponentTypeTagPair.
Declaration
public static GoalMapWeightPair FromTuple((IGridView<double?> goalMap, double weight) tuple)
Parameters
Returns
View Source
GetHashCode()
Returns a hash code based on all of the pair's field's.
Declaration
public override int GetHashCode()
Returns
Overrides
View Source
Matches(GoalMapWeightPair)
True if the given pair has the same goal map and weight; false otherwise.
Declaration
public bool Matches(GoalMapWeightPair other)
Parameters
Returns
View Source
ToTuple()
Converts the pair to an equivalent tuple.
Declaration
public (IGridView<double?> goalMap, double weight) ToTuple()
Returns
Operators
View Source
operator ==(GoalMapWeightPair, GoalMapWeightPair)
True if the given pairs have the same goal map and weight; false otherwise.
Declaration
public static bool operator ==(GoalMapWeightPair left, GoalMapWeightPair right)
Parameters
Returns
View Source
implicit operator (IGridView<double?> goalMap, double weight)(GoalMapWeightPair)
Implicitly converts a GoalMapWeightPair to an equivalent tuple.
Declaration
public static implicit operator (IGridView<double?> goalMap, double weight)(GoalMapWeightPair pair)
Parameters
Returns
View Source
implicit operator GoalMapWeightPair((IGridView<double?> goalMap, double weight))
Implicitly converts a tuple to its equivalent GoalMapWeightPair.
Declaration
public static implicit operator GoalMapWeightPair((IGridView<double?> goalMap, double weight) tuple)
Parameters
Returns
View Source
operator !=(GoalMapWeightPair, GoalMapWeightPair)
True if the given pairs have different goal maps and/or weights; false otherwise.
Declaration
public static bool operator !=(GoalMapWeightPair left, GoalMapWeightPair right)
Parameters
Returns
Implements
Extension Methods