void Start() { onBeat += checkForSongEnd; onBeat += onBeatLocal; Invoke("beginWarmup", startDelay); }
void Start() { lastInvokedBeat = -1; onBeat += checkForSongEnd; AudioHelper.playScheduled(musicSource, StartDelay); Invoke("callMusicStart", StartDelay); }
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 } } } }
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; }
public void UnregisterBeatDelegate(BeatDelegate bDelegate) { BeatEvent -= bDelegate; }
public void RegisterBeatDelegate(BeatDelegate bDelegate) { BeatEvent += bDelegate; }
// Use this for initialization void Start () { sound = GetComponent<AudioSource>(); beatPlayed+=PlayBeat; }
// Use this for initialization void Start() { sound = GetComponent <AudioSource>(); beatPlayed += PlayBeat; }