private void Die()
{
Destroy(gameObject);
GameObject explosion = Instantiate(particleExplosion, transform.position, Quaternion.identity) as GameObject;
Destroy(explosion,1f);
}
What i dont understand here if we run this method my logic says Destroy(gameObject);
this means deletes everything including the script too.If the script is destroyed how can we run the second line
GameObject explosion = Instantiate(particleExplosion, transform.position, Quaternion.identity) as GameObject;
this should be deleted because we destroyed the gameObject.
Thank you.