public void SetDefaults()
{
isDead = false;
currentHealth = maxHealth;
//Enable the components
for (int i = 0; i < disableOnDeath.Length; i++)
{
disableOnDeath[i].enabled = wasEnabled[i];
}
//Enable the gameobjects
for (int i = 0; i < disableGameObjectsOnDeath.Length; i++)
{
disableGameObjectsOnDeath[i].SetActive(true);
}
//Enable the collider
Collider _col = GetComponent<Collider>();
if (_col != null)
_col.enabled = true;
//Create spawn effect
GameObject _gfxIns = (GameObject)Instantiate(spawnEffect, transform.position, Quaternion.identity);
Destroy(_gfxIns, 3f);
}