コード例 #1
0
        private IEnumerator playMe(Model.Sequence seq)
        {
            yield return(new WaitForSeconds(Delay));

            uidCurrentSpeaker = seq.Mode == Model.Enum.SpeakMode.Speak
            ? Speaker.Speak(seq.Text, seq.Source, seq.Voices.Voice, true, seq.Rate, seq.Pitch, seq.Volume)
            : Speaker.SpeakNative(seq.Text, seq.Voices.Voice, seq.Rate, seq.Pitch, seq.Volume);
        }
コード例 #2
0
 public static void Decrement(string key)
 {
     Model.Sequence sequence = accessor.Get(key);
     if (sequence != null)
     {
         sequence.Val--;
         accessor.Update(sequence);
     }
 }
コード例 #3
0
        public static int GetCurrentVal(string key)
        {
            Model.Sequence sequence = accessor.Get(key);
            if (sequence == null)
            {
                return(0);
            }

            return(sequence.Val.Value);
        }
コード例 #4
0
ファイル: SequenceManager.cs プロジェクト: daobataotie/EDERP
 public static void Decrement(string key)
 {
     Model.Sequence sequence = accessor.Get(key);
     if (sequence != null)
     {
         sequence.Val--;
         if (accessor.HasRows(key))
         {
             accessor.Update(sequence);
         }
         else
         {
             accessor.Insert(sequence);
         }
     }
 }
コード例 #5
0
 public static void Increment(string key)
 {
     Model.Sequence sequence = accessor.Get(key);
     if (sequence == null)
     {
         sequence     = new Model.Sequence();
         sequence.Key = key;
         sequence.Val = 0;
     }
     sequence.Val++;
     if (accessor.HasRows(key))
     {
         accessor.Update(sequence);
     }
     else
     {
         accessor.Insert(sequence);
     }
 }
コード例 #6
0
        private IEnumerator playMe(Model.Sequence seq)
        {
            yield return(new WaitForSeconds(Delay));

            Model.Voice voice = Speaker.VoiceForName(seq.RTVoiceName);

            if (voice == null)
            {
                voice = Speaker.VoiceForCulture(Culture);
            }

            if (seq.Mode == Model.Enum.SpeakMode.Speak)
            {
                uidCurrentSpeaker = Speaker.Speak(seq.Text, seq.Source, voice, true, seq.Rate, seq.Pitch, seq.Volume);
            }
            else
            {
                uidCurrentSpeaker = Speaker.SpeakNative(seq.Text, voice, seq.Rate, seq.Pitch, seq.Volume);
            }
        }
コード例 #7
0
        public static int GetNextVal(string key)
        {
            Model.Sequence sequence = accessor.Get(key);
            if (sequence == null)
            {
                sequence     = new Model.Sequence();
                sequence.Key = key;
                sequence.Val = 0;
            }
            sequence.Val++;
            if (accessor.HasRows(key))
            {
                accessor.Update(sequence);
            }
            else
            {
                accessor.Insert(sequence);
            }

            return(sequence.Val.Value);
        }
コード例 #8
0
ファイル: SequenceAccessor.cs プロジェクト: daobataotie/EDERP
 public void Update(Model.Sequence e)
 {
     this.Update <Model.Sequence>(e);
 }
コード例 #9
0
ファイル: SequenceAccessor.cs プロジェクト: daobataotie/EDERP
 public void Insert(Model.Sequence e)
 {
     this.Insert <Model.Sequence>(e);
 }