Code Reference‎ > ‎

Using Namespace

namespace PathologicalGames

Due to the generic nature of some of the type names, such as "Target", a namespace is implemented to protect your project from other Types and 3rd party plugins with the same Type names. 

To access the contents, simply add 'using PathologicalGames;' to the top of the file that needs access.


All Path-o-logical Games packages use this namespace as of version 5.0. Before version 5.0, this was the 'TargetPRO' namespace.


TargetPRO Members in this Namespace

enum DEBUG_LEVELS

Options used to print a stream of messages, or provide debug gizmos. This is not used directly, instead, an option is passed to one of the class debug level parameters. For example:

targetTracker.debugLevel = DEBUG_LEVELS.Off;

Options include:
  • Off
  • Normal
  • High

static class InstanceManager

Contains methods which interface with PoolManager, if installed, and the preprocessor directive at the top of this TargetPro.cs file is uncommented. Otherwise will run Unity's Instantiate() and Destroy().

This is primarily used internally, but if you have a need to manage instances and wish to tie in to this functionality, you could use these methods instead of Unity's.

PoolManager is sold separately. See PoolManager.path-o-logical.com

static Transform Spawn(Transform prefab, Vector3 pos, Quaternion rot)
Creates a new instance. 
If PoolManager is being used, and the pool doesn't exist before this is used, it will be created.

static void Despawn(Transform instance)
Despawns or destroys an instance

      
struct Target

See the documentation page .


class TargetList

A list of Target structs generally obtained from an event delegate. This can be used the same as a normal list: List<Target>

Implemented as a layer of abstraction and to provide a pretty toString() method for debugging


struct HitEffect

See the documentation page .


class HitEffectList

A list of  HitEffect structs generally obtained from an event delegate. This can be used the same as a normal list: List<HitEffect>

Implemented as a layer of abstraction and to provide a pretty toString() method for debugging