Пример #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();
            }
        }
    }
Пример #2
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();
         }
     }
 }
Пример #3
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();
            }
        }
    }
Пример #4
0
    private IEnumerator ActivateRoutine()
    {
        activated = true;

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

        if (SoundManager.Instance != null && starSound != null)
        {
            SoundManager.Instance.PlayClipAtPoint(starSound, Vector3.zero, SoundManager.Instance.fxVolume);
        }
        yield return(new WaitForSeconds(delay));

        SetActive(true);
    }