Assorted static "helper" functions pertaining to Entity
s (parent class of Item, NPC, Player, and Projectile).
More...
|
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...
|
|
Assorted static "helper" functions pertaining to Entity
s (parent class of Item, NPC, Player, and Projectile).
Definition at line 14 of file EntityHelpers.cs.
◆ 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
-
ent | Entity being acted upon. |
worldPosFrom | Source of force. |
force | Amount of force. |
sync | Indicates 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
-
- 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
-
ent | Entity to attempt to identify. |
noContext | Omits 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: