// Use this for initialization void Start() { if (this.gameObject.name == "Asteroid" || this.gameObject.name == "Asteroid(Clone)") { health = 20f; } else { health = 10f; } sAnimation = this.gameObject.GetComponent <DestroyByCollisionSmallExplosion>(); bAnimation = this.gameObject.GetComponent <DestroyByCollisionBigExplosion> (); }
// Use this for initialization void Start() { smallExplosion = GetComponent <DestroyByCollisionSmallExplosion> (); bigExplosion = GetComponent <DestroyByCollisionBigExplosion> (); health = 1000; }