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

Assorted static "helper" functions pertaining to Entitys (parent class of Item, NPC, Player, and Projectile). More...

Static Public Member Functions

static int GetVanillaSnapshotHash (Entity ent, bool noContext)
 Gets a hash value to attempt to uniquely identify a given entity. Not recommended if the specific entity's GetVanillaSnapshotHash(...) (via. the respective Helper) is available. More...
 
static void ApplyForce (Entity ent, Vector2 worldPosFrom, float force, bool sync)
 Applies a given amount of force to the given entity from a given outside point. More...
 
static bool SimpleLineOfSight (Vector2 position, Entity ent, TilePattern blockingTilePatten)
 Attempts a basic trace to see if a given entity is visible from a given point by line of sight (no obstructing tiles). More...
 
static string GetQualifiedName (Entity ent)
 Gets the "qualified" name (the name the player sees) of a given entity. More...
 

Detailed Description

Assorted static "helper" functions pertaining to Entitys (parent class of Item, NPC, Player, and Projectile).

Definition at line 14 of file EntityHelpers.cs.

Member Function Documentation

◆ ApplyForce()

static void HamstarHelpers.Helpers.Entities.EntityHelpers.ApplyForce ( Entity  ent,
Vector2  worldPosFrom,
float  force,
bool  sync 
)
static

Applies a given amount of force to the given entity from a given outside point.

Parameters
entEntity being acted upon.
worldPosFromSource of force.
forceAmount of force.
syncIndicates whether to sync the entity in multiplayer.

Definition at line 63 of file EntityHelpers.cs.

◆ GetQualifiedName()

static string HamstarHelpers.Helpers.Entities.EntityHelpers.GetQualifiedName ( Entity  ent)
static

Gets the "qualified" name (the name the player sees) of a given entity.

Parameters
ent
Returns

Definition at line 96 of file EntityHelpers.cs.

◆ GetVanillaSnapshotHash()

static int HamstarHelpers.Helpers.Entities.EntityHelpers.GetVanillaSnapshotHash ( Entity  ent,
bool  noContext 
)
static

Gets a hash value to attempt to uniquely identify a given entity. Not recommended if the specific entity's GetVanillaSnapshotHash(...) (via. the respective Helper) is available.

Parameters
entEntity to attempt to identify.
noContextOmits whoAmI.
Returns
The identifying hash of the entity.

Definition at line 22 of file EntityHelpers.cs.

◆ SimpleLineOfSight()

static bool HamstarHelpers.Helpers.Entities.EntityHelpers.SimpleLineOfSight ( Vector2  position,
Entity  ent,
TilePattern  blockingTilePatten 
)
static

Attempts a basic trace to see if a given entity is visible from a given point by line of sight (no obstructing tiles).

Parameters
position
ent
blockingTilePatten
Returns

Definition at line 81 of file EntityHelpers.cs.


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