protected override void OnDestroy()
{
animationController = null;
if( EntitySystemWorld.Instance.IsServer() || EntitySystemWorld.Instance.IsSingle() )
{
if( PhysicsModel != null )
{
if( Type.ImpulseDamageCoefficient != 0 || Type.SoundCollision != null )
{
foreach( Body body in PhysicsModel.Bodies )
body.Collision -= Body_Collision;
}
}
}
base.OnDestroy();
}