public override void OnHit() { base.OnHit(); if (!dead) { dead = true; WorldDestroy fx = Instantiate(destroyEffect, transform.position, Quaternion.identity) as WorldDestroy; fx.DoDestroy(myRadius); Destroy(); } }
public override void OnHit() { base.OnHit(); if (!dead) { dead = true; gameObject.SetActive(false); WorldDestroy fx = Instantiate(destroyEffect, transform.position, Quaternion.identity) as WorldDestroy; fx.DoDestroy(1); GameOver.EndGame(); } }