protected override void OnDeath() { PositionTracker.StopTracking(this); _collider.OnDamageTaken -= ApplyDamage; _collider.OnItemsCollected -= AddCollectedItems; _hands.OnPowerGained -= FillSegment; _hands.OnPowerLost -= EmptySegment; var spawnedItem = ItemLoader.CreateItem(Items.ItemActors.ItemActorTypes.HealthPack, Position); var chunk = GameManager.World.ChunkArchitect.GetContainingChunk(Position); chunk.Register(spawnedItem); if (_regenerationCoroutine != null) { StopCoroutine(_regenerationCoroutine); _regenerationCoroutine = null; } Destroy(_collider); }
protected override void OnWorldObjectUnloaded() { PositionTracker.StopTracking(this); }
protected override void OnWorldObjectDestroy() { PositionTracker.StopTracking(this); }