PhysicsAPI reference
Struct TileMoveResult
Namespace: MicroEngine.World
Assembly: MicroEngine.Physics.Tiles.dll
Guide: Tile maps and collision
What happened during a Move. A body of the physics contract reports its move in MoveResult instead.
public readonly struct TileMoveResult : IEquatable<TileMoveResult>Implements
Constructors
TileMoveResult(RectF, bool, bool, bool, bool, TileFlags)
What happened during a Move. A body of the physics contract reports its move in MoveResult instead.
public TileMoveResult(RectF Bounds, bool HitLeft, bool HitRight, bool HitCeiling, bool HitFloor, TileFlags Touched)Parameters
Bounds RectF
The box after the move.
HitLeft bool
Movement to the left was stopped.
HitRight bool
Movement to the right was stopped.
HitCeiling bool
Upward movement was stopped.
HitFloor bool
Downward movement was stopped (the body landed).
Touched TileFlags
Flags of every tile the box overlaps at the end (hazards, water…).
Properties
Bounds
The box after the move.
public RectF Bounds { get; init; }Property Value
HitCeiling
Upward movement was stopped.
public bool HitCeiling { get; init; }Property Value
HitFloor
Downward movement was stopped (the body landed).
public bool HitFloor { get; init; }Property Value
HitLeft
Movement to the left was stopped.
public bool HitLeft { get; init; }Property Value
HitRight
Movement to the right was stopped.
public bool HitRight { get; init; }Property Value
HitWall
Whether horizontal movement was stopped on either side.
public bool HitWall { get; }Property Value
Position
The top-left of Bounds.
public Vector2 Position { get; }Property Value
Touched
Flags of every tile the box overlaps at the end (hazards, water…).
public TileFlags Touched { get; init; }Property Value
Methods
Deconstruct(out RectF, out bool, out bool, out bool, out bool, out TileFlags)
public void Deconstruct(out RectF Bounds, out bool HitLeft, out bool HitRight, out bool HitCeiling, out bool HitFloor, out TileFlags Touched)Parameters
Bounds RectF
HitLeft bool
HitRight bool
HitCeiling bool
HitFloor bool
Touched TileFlags
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(TileMoveResult)
public bool Equals(TileMoveResult other)Parameters
other TileMoveResult
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(TileMoveResult, TileMoveResult)
public static bool operator ==(TileMoveResult left, TileMoveResult right)Parameters
left TileMoveResult
right TileMoveResult
Returns
operator !=(TileMoveResult, TileMoveResult)
public static bool operator !=(TileMoveResult left, TileMoveResult right)Parameters
left TileMoveResult
right TileMoveResult