public static ParticleMgr GetInstance() { if (!Instacne) { Instacne = new ParticleMgr(); } return(Instacne); }
public GameObject square; // 2D Sprite 객체 // Start is called before the first frame update void Start() { if (Instacne == null) { Instacne = this; } else { Destroy(gameObject); } }
public void CheckDestroty() { fAge += Time.deltaTime; if (curHP <= 0) { ParticleMgr.GetInstance().CreateDestroyedParticles(gameObject, ParticleNum); GameObject.Destroy(gameObject); if (Obstacle) { GameObject.Destroy(Obstacle); } } }
private void OnCollisionEnter2D(Collision2D collision) { GameObject Col = collision.gameObject; if (Col.tag == "Wall") { bMove = false; } if (Col.tag == "Boss" && Col.GetComponent <BossBehavior>().GetIsRushing()) { ParticleMgr.GetInstance().CreateDestroyedParticles(gameObject, 80); TetMgr.GetComponent <TetrisMgr>().SetDeletedTetris(iXPos, iYPos); GameObject.Destroy(gameObject); } }