Ejemplo n.º 1
0
    void PlayStart()
    {
        if (Current != null && IsPlaying())
        {
            Stop();
        }
        if (Current.debugText != null)
        {
            Current.debugText.text = "";
        }

        Current = this;
        Initialize();
        MusicSource.Play();
    }
        void Fire(int i)
        {
            if (snd != null)
            {
                if (!playSoundOnlyOnFirst || (playSoundOnlyOnFirst && i == 1))
                {
                    snd.Play();
                }
            }
            UseAmmo();

            transform.BroadcastMessage("OnFire", kick, SendMessageOptions.DontRequireReceiver);

            onFireEvent.Invoke();
            Fire();
        }
Ejemplo n.º 3
0
    void PlayStart()
    {
        if (Current != null && IsPlaying())
        {
            Stop();
        }

        Current = this;
        Initialize();

        WillBlockChange();
#if ADX
        playback    = MusicSource.source.Play();
        NumBlockBar = BlockInfos[playback.GetCurrentBlockIndex()].NumBar;
#else
        MusicSource.Play();
#endif
        OnBlockChanged();
    }