C# Class ByChance.Core.Context

Describes a position a chunk can be aligned at to another one.
Show file Open project: npruehs/bychance Class Usage Examples

Public Methods

Method Description
AlignTo ( Context other ) : void

Aligns this context to other, making Target of both contexts point to each other.

ClearTarget ( ) : void

Breaks the connection between this context and its target, setting Target of both contexts to null.

IsAdjacentTo ( Context other, float offset ) : bool

Checks whether this context is within offset to other.

Protected Methods

Method Description
Context ( string tag ) : System

Constructs a new context of the specified category.

Method Details

AlignTo() public method

Aligns this context to other, making Target of both contexts point to each other.
is null. This context or is already aligned to another context. has a different type than this context.
public AlignTo ( Context other ) : void
other Context Context to align this one to.
return void

ClearTarget() public method

Breaks the connection between this context and its target, setting Target of both contexts to null.
public ClearTarget ( ) : void
return void

Context() protected method

Constructs a new context of the specified category.
is null.
protected Context ( string tag ) : System
tag string Category of the new context.
return System

IsAdjacentTo() public abstract method

Checks whether this context is within offset to other.
public abstract IsAdjacentTo ( Context other, float offset ) : bool
other Context Context to check the adjacency to.
offset float Offset within this context is considered to be adjacent to .
return bool