Mod Helpers  v5.9.6
A centralized collection of library code, helpful services, and end-user functions for mod management and information.
HamstarHelpers.Helpers.Collisions.CollisionHelpers Class Reference

Assorted static "helper" functions pertaining to general collision detecting and handling. More...

Static Public Member Functions

static bool CastRay (Vector2 worldPosition, Vector2 direction, float maxWorldDistance, bool bothChecksOnly=false, Func< Vector2, bool > checkPerUnit=null, Func< int, int, bool > checkPerTile=null)
 Casts a ray from a given world point along a given heading. More...
 

Detailed Description

Assorted static "helper" functions pertaining to general collision detecting and handling.

Definition at line 10 of file CollisionHelpers.cs.

Member Function Documentation

◆ CastRay()

static bool HamstarHelpers.Helpers.Collisions.CollisionHelpers.CastRay ( Vector2  worldPosition,
Vector2  direction,
float  maxWorldDistance,
bool  bothChecksOnly = false,
Func< Vector2, bool >  checkPerUnit = null,
Func< int, int, bool >  checkPerTile = null 
)
static

Casts a ray from a given world point along a given heading.

Parameters
worldPosition
direction
maxWorldDistance
bothChecksOnlyIf both checks return true, the cast ends.
checkPerUnit
checkPerTile
Returns
true if the checker function reports a collision (itself returns true).

Definition at line 21 of file CollisionHelpers.cs.


The documentation for this class was generated from the following files: