public static ExpParticleFactory Instance() { if (instance == null) { instance = new ExpParticleFactory(); } return(instance); }
public void Explode() { if (ice > 0) { ice = 0; } else { BoxManager.GetInstance().RemoveBox(this); ParticleSystem ps = ExpParticleFactory.Instance().CreateExpParticel(transform.position); //ps.transform.parent = transform.parent; Destroy(gameObject); ps.Play(); } }