Пример #1
0
        public override void OnCombatantChange()
        {
            SpeechTimer st = new SpeechTimer(this);

            DoSpeech("Drop Anchor", new int[] { 0x6A }, MessageType.Regular, 0x3B2);
            st.Start();
        }
Пример #2
0
        public void SayNext()
        {
            Say((string)m_SelectedEntry.Speech[m_NextLine]);

            m_NextLine++;

            if (m_NextLine >= m_SelectedEntry.Speech.Count)
            {
                // End here
                m_Timer.Stop();
                m_Timer         = null;
                m_SelectedEntry = null;
                m_Speaking      = false;
            }
        }
Пример #3
0
        public override void OnThink()
        {
            SpeechTimer st = new SpeechTimer(this);

            switch (Utility.Random(7))
            {
            case  0:
                DoSpeech("Raise Anchor", new int[] { 0x6B }, MessageType.Regular, 0x3B2);
                st.Start();
                break;

            case  1:
                DoSpeech("Backwards", new int[] { 0x6B }, MessageType.Regular, 0x3B2);
                st.Start();
                break;

            case  2:
                DoSpeech("Forward", new int[] { 0x6B }, MessageType.Regular, 0x3B2);
                st.Start();
                break;

            case  3:
                DoSpeech("Right", new int[] { 0x6B }, MessageType.Regular, 0x3B2);
                st.Start();
                break;

            case  4:
                DoSpeech("Left", new int[] { 0x6B }, MessageType.Regular, 0x3B2);
                st.Start();
                break;

            case  5:
                DoSpeech("Turn Right", new int[] { 0x6B }, MessageType.Regular, 0x3B2);
                st.Start();
                break;

            case  6:
                DoSpeech("Turn Left", new int[] { 0x6B }, MessageType.Regular, 0x3B2);
                st.Start();
                break;
            }
        }
Пример #4
0
        private void Speak()
        {
            if (m_SpeechStartDelay)
            {
                // First run timer then talk
                m_Speaking = true;

                if (m_Timer != null)
                {
                    m_Timer.Stop();
                    m_Timer = null;
                }

                m_NextLine = 0;
                m_Timer    = new SpeechTimer(this, m_SpeechInterval);
                m_Timer.Start();
            }
            else
            {
                // Start talking right away
                Say((string)m_SelectedEntry.Speech[0]);
                m_Speaking = true;

                if (m_SelectedEntry.Speech.Count > 1)
                {
                    if (m_Timer != null)
                    {
                        m_Timer.Stop();
                        m_Timer = null;
                    }

                    m_NextLine = 1;
                    m_Timer    = new SpeechTimer(this, m_SpeechInterval);
                    m_Timer.Start();
                }
                else
                {
                    m_SelectedEntry = null;
                    m_Speaking      = false;
                }
            }
        }
Пример #5
0
        /// <summary>
        /// Constructs a new book tab instance.
        /// </summary>
        public BookTab(string file)
        {
            this.file        = file;
            this.TabFolder   = Guid.NewGuid().ToString();
            this.cancelToken = new CancellationTokenSource();

            Grid grid = new Grid();

            this.Content           = grid;
            Browser                = new WebBrowser();
            Browser.LoadCompleted += Browser_LoadCompleted;
            grid.Children.Add(Browser);

            ContextMenu contextMenu = new ContextMenu();
            MenuItem    menuItem    = new MenuItem();

            menuItem.Header = "Close tab";
            menuItem.Click += CloseTab_Clicked;
            contextMenu.Items.Add(menuItem);
            this.ContextMenu = contextMenu;

            this.speechTimer                 = new SpeechTimer(xmlLock);
            this.speechTimer.Completed      += Timings_Loaded;
            this.speechTimer.Exception      += ExceptionHandler;
            this.speechTimer.UpdateProgress += UpdateProgressHandler;
            this.speechTimer.Saving         += estimatedTimer_Saving;

            this.estimatedTimer                 = new EstimatedTimer(xmlLock);
            this.estimatedTimer.Completed      += Timings_Loaded;
            this.estimatedTimer.UpdateProgress += UpdateProgressHandler;
            this.estimatedTimer.Saving         += estimatedTimer_Saving;

            this.ManualState          = State.Disabled;
            this.CurrentChapterIndex  = 0;
            this.CurrentSentenceIndex = 0;
            this.ManualTimings        = new Dictionary <int, List <AudioPosition> >();
        }
Пример #6
0
		public void SayNext()
		{
			Say( (string) m_SelectedEntry.Speech[ m_NextLine ] );

			m_NextLine++;

			if ( m_NextLine >= m_SelectedEntry.Speech.Count )
			{
				// End here
				m_Timer.Stop();
				m_Timer = null;
				m_SelectedEntry = null;
				m_Speaking = false;
			}
		}
Пример #7
0
		private void Speak()
		{
			Say( (string) m_SelectedEntry.Speech[ 0 ] );
			m_Speaking = true;

			if ( m_SelectedEntry.Speech.Count > 1 )
			{
				if ( m_Timer != null )
				{
					m_Timer.Stop();
					m_Timer = null;
				}

				m_NextLine = 1;
				m_Timer = new SpeechTimer( this, m_SpeechInterval );
				m_Timer.Start();
			}
			else
			{
				m_SelectedEntry = null;
				m_Speaking = false;
			}
		}
Пример #8
0
 public override void OnThink()
 {
     SpeechTimer st = new SpeechTimer(this);
     switch (Utility.Random( 7 ) )
     {
         case  0:
             DoSpeech("Raise Anchor", new int[] {0x6B}, MessageType.Regular, 0x3B2);
             st.Start();
             break;
         case  1:
             DoSpeech("Backwards", new int[] { 0x6B }, MessageType.Regular, 0x3B2);
             st.Start();
             break;
         case  2:
             DoSpeech("Forward", new int[] { 0x6B }, MessageType.Regular, 0x3B2);
             st.Start();
             break;
         case  3:
             DoSpeech("Right", new int[] { 0x6B }, MessageType.Regular, 0x3B2);
             st.Start();
             break;
         case  4:
             DoSpeech("Left", new int[] { 0x6B }, MessageType.Regular, 0x3B2);
             st.Start();
             break;
         case  5:
             DoSpeech("Turn Right", new int[] { 0x6B }, MessageType.Regular, 0x3B2);
             st.Start();
             break;
         case  6:
             DoSpeech("Turn Left", new int[] { 0x6B }, MessageType.Regular, 0x3B2);
             st.Start();
             break;
     }
 }
Пример #9
0
 public override void OnCombatantChange()
 {
     SpeechTimer st = new SpeechTimer(this);
     DoSpeech("Drop Anchor", new int[] { 0x6A }, MessageType.Regular, 0x3B2);
     st.Start();
 }