Ejemplo n.º 1
0
 public static ParticleMgr GetInstance()
 {
     if (!Instacne)
     {
         Instacne = new ParticleMgr();
     }
     return(Instacne);
 }
Ejemplo n.º 2
0
    public GameObject square; // 2D Sprite 객체

    // Start is called before the first frame update
    void Start()
    {
        if (Instacne == null)
        {
            Instacne = this;
        }
        else
        {
            Destroy(gameObject);
        }
    }
Ejemplo n.º 3
0
 public void CheckDestroty()
 {
     fAge += Time.deltaTime;
     if (curHP <= 0)
     {
         ParticleMgr.GetInstance().CreateDestroyedParticles(gameObject, ParticleNum);
         GameObject.Destroy(gameObject);
         if (Obstacle)
         {
             GameObject.Destroy(Obstacle);
         }
     }
 }
Ejemplo n.º 4
0
    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);
        }
    }