public override void Die() { if (!alreadyDead) { base.Die(); ArenaManager arenaManager = ArenaManager.arenaManager; EnemyLootCrate lootCrate = lootManager.GenerateEnemyLootCrate(); if (lootCrate != null) { lootCrate.transform.position = transform.position; lootCrate.SetUpFloatingMove(); if (arenaManager != null) { arenaManager.DropManager.AddDropCrate(lootCrate); } } if (arenaManager != null) { arenaManager.IncreaseNumberOfKilledEnemies(); } shipBody.velocity = Vector3.zero; shipBody.constraints = RigidbodyConstraints.FreezeAll; if (shipBoxCollider != null) { shipBoxCollider.enabled = false; } if (shipFeedbacks != null) { shipFeedbacks.DesactivateSlowParticles(); } if (attackPreparationWarningAnim != null) { attackPreparationWarningAnim.gameObject.SetActive(false); } } #region Variables reset externalySetedUp = false; remainingStunDuration = 0; skeweringProjectile = null; currentProtectionParameters = default; remainingBlindingDuration = 0; currentReactionTime = 0; lastPredictedPosition = Vector3.zero; remainingTimeBeforeExitRoutine = 0; remainingTimeBeforeBackToRoutine = 0; outOfRoutineModificationCoeff = 0; watchingRoundParameters = default; targetShip = null; nextPhaseIndex = 0; relatedDetectionZone.ResetDetectionZone(); #endregion }