Example #1
0
 // Token: 0x06000635 RID: 1589 RVA: 0x0001E09C File Offset: 0x0001C29C
 private void Awake()
 {
     global::EscalationVR.EscalationVRContext context = new global::EscalationVR.EscalationVRContext();
     global::VRGIN.Core.VRManager.Create <global::EscalationVR.EscalationInterpreter>(context);
     global::VRGIN.Core.VR.Manager.SetMode <global::EscalationVR.MasoMode>();
     global::UnityEngine.SceneManagement.SceneManager.activeSceneChanged += delegate(global::UnityEngine.SceneManagement.Scene current, global::UnityEngine.SceneManagement.Scene next)
     {
         global::UnityChanLipSync      lipSync = global::UnityEngine.Object.FindObjectOfType <global::UnityChanLipSync>();
         global::FlagActivator_Skanojo flagActivator_Skanojo = global::UnityEngine.Object.FindObjectOfType <global::FlagActivator_Skanojo>();
         bool flag = lipSync;
         if (flag)
         {
             bool flag2 = !lipSync.audio_.spatialize;
             if (flag2)
             {
                 global::UnityEngine.Debug.Log("SPATIALIZE");
                 global::UnityEngine.Transform        transform         = flagActivator_Skanojo.transform.FindDescendant("Head");
                 global::UnityEngine.AudioSource      audioSource       = global::VRGIN.Helpers.UnityHelper.CopyComponent <global::UnityEngine.AudioSource>(lipSync.audio_, transform.gameObject);
                 global::System.Reflection.MethodInfo onAudioFilterRead = typeof(global::LipSyncCore).GetMethod("OnAudioFilterRead", 36);
                 object[] parameterArray = new object[2];
                 audioSource.gameObject.AddComponent <global::EscalationVR.ForwardAudioEvent>().AudioFilterRead = delegate(float[] p1, int p2)
                 {
                     parameterArray[0] = p1;
                     parameterArray[1] = p2;
                     onAudioFilterRead.Invoke(lipSync, parameterArray);
                 };
                 lipSync.audio_              = audioSource;
                 lipSync.audio_.spatialize   = true;
                 lipSync.audio_.spatialBlend = 1f;
             }
         }
     };
 }
Example #2
0
        // Token: 0x06000002 RID: 2 RVA: 0x000021D4 File Offset: 0x000003D4
        private void Update()
        {
            bool flag = this._windowManager;

            if (flag)
            {
                bool flag2 = !this.IsAutoplaying;
                if (flag2)
                {
                    bool wasAutoPlaying = this._wasAutoPlaying;
                    if (wasAutoPlaying)
                    {
                        this._hideWindowProp.SetValue(this._windowManager, false);
                    }
                    this._wasAutoPlaying = false;
                    return;
                }
                this._wasAutoPlaying = true;
                this._hideWindowProp.SetValue(this._windowManager, true);
                string text  = this._messageProp.GetValue(this._windowManager) as string;
                bool   flag3 = text != this._text;
                if (flag3)
                {
                    this._text = text;
                    int  num   = (int)this._speakerProp.GetValue(this._windowManager);
                    bool flag4 = num == 99;
                    if (flag4)
                    {
                        this.Speak(text);
                        this.IsAutoplayingVoice = true;
                    }
                    else
                    {
                        this.AbortSpeak();
                    }
                    bool flag5 = this._voiceProp.GetValue(this._windowManager) as string == "";
                    if (flag5)
                    {
                        this._messageSpeedProp.SetValue(null, 1000);
                        this._autoSpeedProp.SetValue(null, 0f);
                    }
                }
            }
            bool flag6 = this._speakProcess != null && this._speakProcess.HasExited;

            if (flag6)
            {
                global::UnityEngine.AudioSource audio_ = global::UnityEngine.Object.FindObjectOfType <global::LipSyncCore>().audio_;
                audio_.loop = false;
            }
        }
Example #3
0
 // Token: 0x06000003 RID: 3 RVA: 0x00002354 File Offset: 0x00000554
 private void Speak(string text)
 {
     this.AbortSpeak();
     this._speakProcess = global::System.Diagnostics.Process.Start(new global::System.Diagnostics.ProcessStartInfo(this._jTalkerPath)
     {
         Arguments = global::EscalationVR.ProcessUtils.EncodeParameterArgument(text, false),
         RedirectStandardOutput = true,
         UseShellExecute        = false,
         CreateNoWindow         = true
     });
     global::UnityEngine.AudioSource audio_ = global::UnityEngine.Object.FindObjectOfType <global::LipSyncCore>().audio_;
     audio_.clip = this._silence;
     audio_.loop = true;
     audio_.Play();
 }
Example #4
0
        // Token: 0x06000004 RID: 4 RVA: 0x000023D0 File Offset: 0x000005D0
        private void AbortSpeak()
        {
            bool flag = this._speakProcess != null;

            if (flag)
            {
                bool flag2 = !this._speakProcess.HasExited;
                if (flag2)
                {
                    this._speakProcess.Kill();
                }
                global::UnityEngine.AudioSource audio_ = global::UnityEngine.Object.FindObjectOfType <global::LipSyncCore>().audio_;
                audio_.loop        = false;
                this._speakProcess = null;
            }
        }