Skip to content

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.

C#
public readonly struct TileMoveResult : IEquatable<TileMoveResult>

Implements

IEquatable<TileMoveResult>

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.

C#
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.

C#
public RectF Bounds { get; init; }

Property Value

RectF

HitCeiling

Upward movement was stopped.

C#
public bool HitCeiling { get; init; }

Property Value

bool

HitFloor

Downward movement was stopped (the body landed).

C#
public bool HitFloor { get; init; }

Property Value

bool

HitLeft

Movement to the left was stopped.

C#
public bool HitLeft { get; init; }

Property Value

bool

HitRight

Movement to the right was stopped.

C#
public bool HitRight { get; init; }

Property Value

bool

HitWall

Whether horizontal movement was stopped on either side.

C#
public bool HitWall { get; }

Property Value

bool

Position

The top-left of Bounds.

C#
public Vector2 Position { get; }

Property Value

Vector2

Touched

Flags of every tile the box overlaps at the end (hazards, water…).

C#
public TileFlags Touched { get; init; }

Property Value

TileFlags

Methods

Deconstruct(out RectF, out bool, out bool, out bool, out bool, out TileFlags)

C#
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)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(TileMoveResult)

C#
public bool Equals(TileMoveResult other)

Parameters

other TileMoveResult

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(TileMoveResult, TileMoveResult)

C#
public static bool operator ==(TileMoveResult left, TileMoveResult right)

Parameters

left TileMoveResult

right TileMoveResult

Returns

bool

operator !=(TileMoveResult, TileMoveResult)

C#
public static bool operator !=(TileMoveResult left, TileMoveResult right)

Parameters

left TileMoveResult

right TileMoveResult

Returns

bool