void Die() { Debug.Log("DIE"); isDead = true; deathEffectOffset = new Vector3(0f, 2f, 0f); GameObject effect = (GameObject)Instantiate(deathEffect, transform.position + deathEffectOffset, Quaternion.identity); Destroy(effect, 5f); MonsterSpawner.GetComponent <MonsterSpawner>().monsterCount--; Destroy(gameObject); }