OnEntityKill
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private object OnEntityKill( BaseNetworkable instance )
{
Puts( "OnEntityKill works!" );
return null;
}Location
- BaseNetworkable::Kill(BaseNetworkable.DestroyMode mode, bool callOnKilled)
csharp
//---
{
if (IsDestroyed)
{
Debug.LogWarning("Calling kill - but already IsDestroyed!? " + this);
}
else if (Interface.CallHook("OnEntityKill", this) == null)
{
EntityProfiler.killed++;
if (EntityProfiler.mode >= 2)
{
EntityProfiler.OnKilled(this);
//---