tModLoader  0.12 Alpha
A mod to make and play Terraria mods
Terraria.Utilities.NPCUtils Class Reference

Classes

class  SearchFilters
 
struct  TargetSearchResults
 

Public Types

enum class  TargetSearchFlag { None = 0x0 , NPCs = 0x1 , Players = 0x2 , All = 0x3 }
 
enum class  TargetType { None , NPC , Player , TankPet }
 

Public Member Functions

delegate void NPCTargetingMethod (NPC searcher, bool faceTarget, Vector2? checkPosition)
 
delegate bool SearchFilter< T > (T entity)
 

Static Public Member Functions

static TargetSearchResults SearchForTarget (NPC searcher, TargetSearchFlag flags=TargetSearchFlag.All, SearchFilter< Player > playerFilter=null, SearchFilter< NPC > npcFilter=null)
 
static TargetSearchResults SearchForTarget (NPC searcher, Vector2 position, TargetSearchFlag flags=TargetSearchFlag.All, SearchFilter< Player > playerFilter=null, SearchFilter< NPC > npcFilter=null)
 
static TargetSearchResults SearchForTarget (Vector2 position, TargetSearchFlag flags=TargetSearchFlag.All, SearchFilter< Player > playerFilter=null, SearchFilter< NPC > npcFilter=null)
 
static void TargetClosestBetsy (NPC searcher, bool faceTarget=true, Vector2? checkPosition=null)
 
static void TargetClosestCommon (NPC searcher, bool faceTarget=true, Vector2? checkPosition=null)
 
static void TargetClosestDownwindFromNPC (NPC searcher, float distanceMaxX, bool faceTarget=true, Vector2? checkPosition=null)
 
static void TargetClosestNonBees (NPC searcher, bool faceTarget=true, Vector2? checkPosition=null)
 
static void TargetClosestOldOnesInvasion (NPC searcher, bool faceTarget=true, Vector2? checkPosition=null)