Skip to main content

CombatEventHandler

A delegate in Root.Township, the global namespace.

Handler for CausedCombat on PlayerController and PlayerEventsManager: who attacked, what was hit, the squared distance ratio between them, and the damage.

Constructors​

MemberWhat it is
CombatEventHandler(object object, IntPtr method)Made by the compiler when you assign a method to this delegate; you don't call it directly.

Methods​

MemberWhat it is
virtual IAsyncResult BeginInvoke(PlayerController attacker, NetworkEntity attackee, float distanceRatioBetweenCombatantsSquared, float damage, AsyncCallback callback, object object)Starts the call on another thread; not supported in Unity, so use Invoke.
virtual void EndInvoke(IAsyncResult result)Waits for a call started with BeginInvoke; not supported in Unity.
virtual void Invoke(PlayerController attacker, NetworkEntity attackee, float distanceRatioBetweenCombatantsSquared, float damage)Calls every method on this delegate with these arguments.

Used in​

Members of other types that take, return or hold a CombatEventHandler: