private void ReadBook(object sender, RPGEvents.ReadBookEventArgs e) { var book = e.Book; CurrentAudio = e.NullableAudio; UpdateState(book); }
public void ReadBook(Book book) { if (book == null) { return; } if (CurrentBook != null) { CloseBook(); } AudioBase audioObj = null; if (book.BookType == BookType.Audio) { var go = AudioPlayer.Instance.Play(book.Audio, AudioType.Voice, Vector3.zero, null, AudioBookId); if (go != null) { audioObj = go.GetComponent <AudioBase>(); } } CurrentBook = book; if (CurrentBook != null) { CurrentBook.CurrentPage = 0; } var args = new RPGEvents.ReadBookEventArgs { Book = book, NullableAudio = audioObj }; RPG.Events.OnReadBook(args); }
private void ClosedBook(object sender, RPGEvents.ClosedBookEventArgs e) { AudioPanel.SetActive(BookHandler.Reading && BookHandler.CurrentBook.BookType == BookType.Audio); PictureBookPanel.SetActive(BookHandler.Reading && BookHandler.CurrentBook.BookType == BookType.Picture); TextBookPanel.SetActive(BookHandler.Reading && BookHandler.CurrentBook.BookType == BookType.Text); CurrentAudio = null; }
public float GetMasterVolume(AudioBase.AudioType type) { float volume = 1f; this.masterVolume.TryGetValue(type, out volume); return volume; }
public DeviceBase(AudioBase audio, VideoBase video) { _audio = audio; _video = video; _deviceType = DeviceType.NO_DEVICE; _name = "Plug in your Kinect"; }
public DeviceBase(AudioBase audio, VideoBase video, KinectSensor sensor_xbox360) { _audio = audio; _video = video; sensor = sensor_xbox360; _deviceType = DeviceType.KINECT_1; _name = "K360-" + sensor.UniqueKinectId; }
public DeviceBase(AudioBase audio, VideoBase video, String filePath) { _audio = audio; _video = video; _filePath = filePath; _deviceType = DeviceType.RECORD_FILE_KINECT_1; _name = "RF-" + System.IO.Path.GetFileName(_filePath); replay = new KinectReplay(_filePath); replay.ReplayFinished += Replay_ReplayFinished; }
public void SetMasterVolume(AudioBase.AudioType type, float volume) { this.masterVolume[type] = Mathf.Clamp(volume, 0, 1); //Debug.Log("Changing Master Volume: " + type + " - " + this.masterVolume[type]); // Save it persistently PlayerPrefs.SetFloat("MasterVolume_" + type, this.masterVolume[type]); // Fire the event this.ThisVolumeChanged(this, new VolumeChangeEventArgs(type, volume)); }
public AudioBase GetSoundObjectByID(string soundId) { AudioBase foundSound = null; var audioObjects = GameObject.FindGameObjectsWithTag("RPGAudioObject"); for (int i = 0; i < audioObjects.Length; i++) { var child = audioObjects[i]; var comp = child.GetComponent <AudioBase>(); if (comp != null && comp.SoundID == soundId) { foundSound = comp; break; } } return(foundSound); }
public Device(AudioBase audio, VideoBase video) : base(audio, video) { }
public Device(AudioBase audio, VideoBase video, String filePath) : base(audio, video, filePath) { }
public Device(AudioBase audio, VideoBase video, KinectSensor sensor_xbox360) : base(audio, video, sensor_xbox360) { }
public VolumeChangeEventArgs(AudioBase.AudioType audioType, float volume) { this.audioType = audioType; this.volume = volume; }
public ComandosDinamicosDeAudio(AudioBase audio, GerenciadorDeFilas gerenciadorDeFilas) { Audio = audio; GerenciadorDeFilas = gerenciadorDeFilas; GerenciadorDeFilas.ExecutorDeAudio.AoFinalizarExecucao = FinalizarExecucao; }