public override void Stop() { base.Stop(); StopCoroutine("RunWhenLoaded"); mobileVideoTrack.controls.DeactivatePlane(); Diglbug.Log("Stopping mobile video track " + name, PrintStream.AUDIO_PLAYBACK); mobileVideoTrack.controls.Stop(); SetSourceTime(0f); }
public static string PayloadName(Payload p) { switch (p) { default: Diglbug.LogError("Failed to return a pre-defined PayloadName for " + p + " - please define one!"); return("undefined_payload_string"); } }
public override void StartReceiving() { Diglbug.LogMobile("Start rec", "PIPE"); pipe.Digl_Stop(); pipe.Digl_SetSwitch(BroadcastMode.receive); // The null beacon is set pipe.Digl_Start(); ActivateReinitialiseCountdown(); ResetReinitialiseCountdown(); }
public void CustomSceneConfirmed() { if (pendingItem == false) { Diglbug.LogError("Confirmed an undefined custom scene start."); return; } sceneControls.BeginCustomAct(actPayloadPairs.GetActForDefinedAct(pendingItem.act)); Diglbug.Log("Confirmed: Sending custom act from item select " + pendingItem.act); }
private void RecoverSignature() { int oldSignature = PlayerPrefs.GetInt(oldSignatureKey, 0); if (oldSignature == 0) { Diglbug.Log("Old Signature was None! This may happen for Actors", PrintStream.RECOVERY); } ShowMode.Instance.Signature = (Signature)oldSignature; }
public void ClearExpectedPayload() { Diglbug.Log("Cleared expected payload", PrintStream.SIGNALS); expectingPayload = false; upcomingPayload = Payload.NONE; if (ExpectedPayloadClearedEvent != null) { ExpectedPayloadClearedEvent(); } }
public void ShowNotUnderway() { if (runningRecovery) { Diglbug.Log("Blocked a ShowUnderway call while we're running recovery", PrintStream.RECOVERY); return; } showUnderway = false; PlayerPrefs.SetInt(showUnderwayKey, 0); }
public override void Play() { base.Play(); placeholderScreen.SetActive(true); Diglbug.Log("Play " + name, PrintStream.VIDEO); SetSourceTime(0f); Unpause(); audioPlayer.Play(); trackRunning = true; }
public override void Stop() { base.Stop(); placeholderScreen.SetActive(false); Diglbug.Log("Stop " + name, PrintStream.VIDEO); SetSourceTime(0f); audioPlayer.Stop(); trackRunning = false; }
public override void ModeSelected() { if (!RecoveryManager.Instance.RunningRecovery()) { Diglbug.Log("Welcome to the show, Audience Member"); BLE.Instance.Manager.StartReceiving(); StartCoroutine("RunBeginShowRoutine"); } // BeginShow (); }
public void OptionPressed(DebugStreamOption option, bool value) { if (value) { Diglbug.EnablePrintStream(option.stream); } else { Diglbug.DisablePrintStream(option.stream); } }
public override void Exit() { if (gameObject.activeSelf) { animator.SetBool("open", false); } else { Diglbug.Log("Ignored a close request for " + name + " because we were inactive", PrintStream.ANIMATION); } }
private void CheckEvents(List <TimingEvent> events, float previousTime, float currentTime) { for (int k = 0; k < events.Count; k++) { if (EventShouldOccur(events[k], previousSourceTime, currentTime)) { Diglbug.Log(name.Substring(0, 5) + "(def:" + events[k].time + ")" + " Event fired for at time " + currentTime, PrintStream.DELEGATES); events [k].function(); } } }
private void Awake() { if (audioClip) { SetAudioClip(audioClip); } else { Diglbug.LogWarning("AudioClip not found at Awake for " + name + ", this must be set before use"); } }
public Sprite GetSpriteForAct(DefinedAct a) { for (int k = 0; k < photos.Length; k++) { if (photos [k].GetDefinedAct() == a) { return(photos [k].GetPhoto()); } } Diglbug.Log("Couldn't find Guide Photo for defined act " + a); return(defaultSprite); }
public Act GetActForDefinedAct(DefinedAct a) { for (int k = 0; k < acts.Length; k++) { if (acts [k].definedAct == a) { return(acts [k]); } } Diglbug.LogWarning("GetActForDefinedAct request returned empty! " + a); return(null); }
public static void SetAllPrintStream(bool active) { if (active) { Diglbug.Log("Enabled all PrintStreams", PrintStream.PRINT_STREAMS); } else { Diglbug.Log("Disabled all PrintStreams", PrintStream.PRINT_STREAMS); } streamPrintEnabled = Utils.booleanArray(Enum.GetValues(typeof(PrintStream)).Length, active); }
public void SkipToNextTrack() { Diglbug.Log("Skipping track... ", PrintStream.AUDIO_PLAYBACK); bool shouldSkip = (currentOutput.GetTrack() is LoopingTrack); currentOutput.Skipped(); // just used for FireRemainingEvents. if (shouldSkip) { PlayNextTrack(); } // this is firing the event to begin the next track. Looping don't, though. }
private void SetCurrentMode(Mode m) { if (Mode != null) { Mode.ModeDeselected(); } Mode = m; SetFabMode(false); Mode.ModeSelected(); RecoveryManager.Instance.SetMode(m.ModeName); Diglbug.Log("Set Mode to " + Mode.ModeName, PrintStream.MODES); }
public void SendExpectedPayload() { if (expectingPayload) { RequestSendSignal(GetExpectedSignal()); ClearExpectedPayload(); } else { Diglbug.Log("Requested SendExpectedPayload when not expecting!"); } }
public Payload GetPayloadForDefinedAct(DefinedAct a) { for (int k = 0; k < acts.Length; k++) { if (acts [k].definedAct == a) { return(acts [k].entryPayload); } } Diglbug.LogWarning("GetPayloadForDefinedAct request returned empty! " + a); return(Payload.NONE); }
public void Load() { if (ShouldLoad()) { RunLoad(); Diglbug.Log("Loading track " + GetTrackName(), PrintStream.MEDIA_LOAD); } else { Diglbug.Log("Skipping load of already-loaded/ing track " + GetTrackName(), PrintStream.MEDIA_LOAD); } }
public void Unload() { if (ShouldUnload()) { RunUnload(); Diglbug.Log("Unloading track " + GetTrackName(), PrintStream.MEDIA_LOAD); } else { Diglbug.Log("Skipping unload of already-unloaded track " + GetTrackName(), PrintStream.MEDIA_LOAD); } }
public TracklistEntry GetFirstTrackEntry() { if (trackEntries.Length == 0) { Diglbug.Log("GetFirstTrackEntry requested but no trackEntires found for ActorActSet " + name, PrintStream.DEBUGGING); return(null); } else { return(trackEntries [0]); } }
public Act GetActForPayload(Payload p) { for (int k = 0; k < acts.Length; k++) { if (acts [k].entryPayload == p) { return(acts [k]); } } Diglbug.LogWarning("GetActForPayload request returned empty! " + p); return(null); }
public void RemoveOneShotDelegate(FloatDelegate function) { if (oneShotDelegates.Contains(function)) { oneShotDelegates.Remove(function); FloatEvent -= function; } else { Diglbug.LogError("Unexpected call to RemoveOneShotDelegate"); } Diglbug.Log("Removed oneShotDelegate, total: " + oneShotDelegates.Count, PrintStream.DELEGATES); }
public void SetMode(ModeName modeName) { Mode newMode = GetModeByName(modeName); if (newMode != null) { SetCurrentMode(newMode); } else { Diglbug.LogError("Mode with name " + modeName + " not found!"); } }
public void PayloadExpected(Payload p) { if (p != upcomingPayload) { Diglbug.Log("Warning: Demanded PayloadExpected " + p + " doesn't match upcomingPayload " + upcomingPayload, PrintStream.SIGNALS); SetUpcomingPayload(p); } expectingPayload = true; if (ExpectedPayloadReadyEvent != null) { ExpectedPayloadReadyEvent(p); } }
private void PlayTrackEntryAtIndex(int index, float timeSkip) { if (index < tracklist.entries.Length) { trackIndex = index; TracklistEntry entry = tracklist.GetTrackEntryAtIndex(index); HandlePlayRequest(entry, timeSkip); } else { Diglbug.Log("Refused to play track at invalid index: " + index); } }
private void Update() { if (isReceiving) { timePassedSinceLastReception += Time.deltaTime; if (timePassedSinceLastReception > pluginReinitialiseTimeout) { Diglbug.Log("Reinitialising iOS BLE Rec", PrintStream.SIGNALS); ResetReinitialiseCountdown(); StartReceiving(); // re-trigger the StartReceiving, which shoudl reinitialise the plugin. } } }