Exemplo n.º 1
0
    public void BreakTileFXAt(int breakableValue, int x, int y, int z = 0)
    {
        GameObject   breakFX      = null;
        ParticlePlay particlePlay = null;

        if (breakableValue > 1)
        {
            if (doublebreakFXPrefab != null)
            {
                breakFX = Instantiate(doublebreakFXPrefab, new Vector3(x, y, z), Quaternion.identity);
            }
        }
        else
        {
            if (breakFXPrefab != null)
            {
                breakFX = Instantiate(breakFXPrefab, new Vector3(x, y, z), Quaternion.identity);
            }
        }
        if (breakFX != null)
        {
            particlePlay = breakFX.GetComponent <ParticlePlay>();

            if (particlePlay != null)
            {
                particlePlay.Play();
            }
        }
    }
Exemplo n.º 2
0
 // Start is called before the first frame update
 private void Awake()
 {
     if (Singleton2 != null)
     {
         Destroy(gameObject);
     }
     else
     {
         Singleton2 = this;
     }
 }
Exemplo n.º 3
0
 public void BombFXAt(int x, int y, int z = 0)
 {
     if (bombEffectPrefab != null)
     {
         GameObject   bombFX       = Instantiate(bombEffectPrefab, new Vector3(x, y, z), Quaternion.identity);
         ParticlePlay particlePlay = bombFX.GetComponent <ParticlePlay>();
         if (particlePlay != null)
         {
             particlePlay.Play();
         }
     }
 }
Exemplo n.º 4
0
    public void ClearPieceFXAt(int x, int y, int z = 0)
    {
        if (clearFXPrefab != null)
        {
            GameObject clearFX = Instantiate(clearFXPrefab, new Vector3(x, y, z), Quaternion.identity);

            ParticlePlay particlePlay = clearFX.GetComponent <ParticlePlay>();

            if (particlePlay != null)
            {
                particlePlay.Play();
            }
        }
    }