Exemple #1
0
    private void LateUpdate()
    {
        if (militar.IsDead() && gameObject != null)
        {
            ResetTask();
            Map.unitList.Remove(this);
            if (stratManager != null) // Para escenarios de prueba sin strategyManager
            {
                stratManager.RemoveUnitFromSchedulers(this);
            }

            GameObject.DestroyImmediate(gameObject);
        }
    }