コード例 #1
0
 protected virtual void OnRightHandClosedEvent(Body body)
 {
     Debug.WriteLine("右手握拳");
     SpeechHelp.GetInstance().Speak("右手握拳", true);
     RightHandCloseEvent?.Invoke(body);
     OnHandClosedEvent(body);
 }
コード例 #2
0
        /// <summary>
        /// 单例获取语音模块类<see cref="FitnessCoach.Util.SpeechHelp"/>
        /// </summary>
        /// <returns></returns>
        public static SpeechHelp GetInstance()
        {
            if (_instance == null)
            {
                lock (SyncRoot)
                {
                    if (_instance == null)
                    {
                        _instance = new SpeechHelp();
                    }
                }
            }

            return(_instance);
        }