void Start()
    {
        onBeat += checkForSongEnd;
        onBeat += onBeatLocal;

        Invoke("beginWarmup", startDelay);
    }
예제 #2
0
 void Start()
 {
     lastInvokedBeat = -1;
     onBeat         += checkForSongEnd;
     AudioHelper.playScheduled(musicSource, StartDelay);
     Invoke("callMusicStart", StartDelay);
 }
예제 #3
0
        protected void DoBeat()
        {
            while (true)
            {
                Thread.Sleep(HEARTBEAT_PERIOD);

                HashSet <string> nodes = new HashSet <string>(View.Nodes);

                foreach (var node in nodes)
                {
                    try
                    {
                        RemotingEndpoint remotingEndpoint = GetRemoteEndpoint(node);
                        BeatDelegate     beatDelegate     = remotingEndpoint.Beat;

                        beatDelegate.BeginInvoke(EndpointURL, asyncResult =>
                        {
                            AsyncResult ar         = (AsyncResult)asyncResult;
                            BeatDelegate remoteDel = (BeatDelegate)ar.AsyncDelegate;
                            remoteDel.EndInvoke(asyncResult);
                        }, null);
                    } catch (RemotingException)
                    {
                        // do nothing
                    }
                }
            }
        }
예제 #4
0
    private void Awake()
    {
        onBeat       = null;
        onMusicStart = null;

        musicSource      = GetComponent <AudioSource>();
        musicSource.clip = timingData.MusicClip;
        timingData.initiate(musicSource, beatMap);
    }
    private void Awake()
    {
        onBeat       = null;
        onMusicStart = null;

        warmupBeatQueue = new Queue <int>(warmupBeats);

        musicSource      = GetComponent <AudioSource>();
        musicSource.clip = timingData.MusicClip;
        timingData.initiate(musicSource, beatMap, warmupBeats.Count());
        victoryBeat      = timingData.BeatMap.TargetBeats.Last().HitBeat + finalSlashVictoryBeatDelay;
        initialTimeScale = Time.timeScale;
    }
예제 #6
0
 public void UnregisterBeatDelegate(BeatDelegate bDelegate)
 {
     BeatEvent -= bDelegate;
 }
예제 #7
0
 public void RegisterBeatDelegate(BeatDelegate bDelegate)
 {
     BeatEvent += bDelegate;
 }
예제 #8
0
	// Use this for initialization
	void Start () {
         sound = GetComponent<AudioSource>();
         beatPlayed+=PlayBeat;
	}
예제 #9
0
 // Use this for initialization
 void Start()
 {
     sound       = GetComponent <AudioSource>();
     beatPlayed += PlayBeat;
 }