public void initDead(float posx, float posy, int x) { GameObject expObject = new GameObject(); explosion expl = expObject.AddComponent <explosion> (); Vector3 posv = new Vector3(posx, posy, 0); expl.transform.position = posv; expl.init(posv, x); }
public void initDead() { GameObject expObject = new GameObject(); explosion expl = expObject.AddComponent <explosion> (); Vector3 posv = new Vector3(transform.position.x, transform.position.y, 0); expl.transform.position = posv; expl.init(posv, 5); }
public void initHit(float posx, float posy, int x) { if (this.getHealth() >= 0) { GameObject expObject = new GameObject(); explosion expl = expObject.AddComponent <explosion> (); Vector3 posv = new Vector3(posx, posy, 0); expl.transform.position = posv; expl.init(posv, x); } }