//private void TestScriptDisplay() //{ // if (this._dbpediaResult.Success == false) // { // //we could not identify the image, so activate the voice prompt // this.audioPlayer.PlayOneShot(this.failurePrompt); // } // else // { // if (this.useSpeech) // { // SpeakText s = new SpeakText(); // StartCoroutine(s.Speak(this._dbpediaResult.Painting + " by " + this._dbpediaResult.Artist, this.audioPlayer, LanguageHelper.LanguageType.ENGLISH, this.gender)); // } // //this.testScript.PlaceObject(); // } // //finally reset processing // ResetProcessing(); //} IEnumerator CreateDisplay() { if (this._dbpediaResult.Success == false) { //we could not identify the image, so activate the voice prompt this.audioPlayer.PlayOneShot(this.failurePrompt); } else { if (this.useSpeech) { SpeakText s = new SpeakText(); StartCoroutine(s.Speak(this._dbpediaResult.Painting + " by " + this._dbpediaResult.Artist, this.audioPlayer, LanguageHelper.LanguageType.ENGLISH, this.gender)); } //now we need to create the SlateUIGUI prefab GameObject display = this.InstantiateDisplayPanel(); this.displayPanelManager.AddPanel(display); //configure the panel DisplayPanel panelProp = display.GetComponent <DisplayPanel>(); panelProp.depiction = this._dbpediaResult.Depiction; panelProp.paintingUIText.text = "<size=24>" + this._dbpediaResult.Painting + "</size>"; panelProp.artistUIText.text = "<size=24>" + this._dbpediaResult.Artist + "</size>";; panelProp.timeUIText.text = (this._imageProcessor._endProcessingTime - this._imageProcessor._beginProcessingTime).ToString(); panelProp.timeUIText.text = "<size=24>Time: " + panelProp.timeUIText.text + "</size>"; panelProp.moreInfoLink = this._dbpediaResult.URL; //now we need to download a thumbnail of the painting. //yield return StartCoroutine(DownloadThumbnailImage(panelProp)); } //finally reset processing debug.PrintPlus("ending display"); ResetProcessing(); yield break; }
public static void PlayTextToSpeech(string text) { SpeachEventArgs args = new SpeachEventArgs(text); SpeakText?.Invoke(null, args); }
public override int GetHashCode() { int hash = 1; if (ID != 0L) { hash ^= ID.GetHashCode(); } if (CommandType != 0) { hash ^= CommandType.GetHashCode(); } if (MoveDirection != 0) { hash ^= MoveDirection.GetHashCode(); } if (MoveDuration != 0) { hash ^= MoveDuration.GetHashCode(); } if (ThrowDistance != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(ThrowDistance); } if (ThrowAngle != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(ThrowAngle); } if (IsThrowDish != false) { hash ^= IsThrowDish.GetHashCode(); } if (UseType != 0) { hash ^= UseType.GetHashCode(); } if (SpeakText.Length != 0) { hash ^= SpeakText.GetHashCode(); } if (Parameter1 != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Parameter1); } if (Parameter2 != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Parameter2); } if (IsSetTalent != false) { hash ^= IsSetTalent.GetHashCode(); } if (IsPickSelfPosition != false) { hash ^= IsPickSelfPosition.GetHashCode(); } if (PickType != 0) { hash ^= PickType.GetHashCode(); } if (PickDishOrToolType != 0) { hash ^= PickDishOrToolType.GetHashCode(); } if (Talent != 0) { hash ^= Talent.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
private void OnSpeakClick(int position) { SpeakText?.Invoke(this, position); }
public LanguageChecker(SpeakText speakText, DefaultLanguage defaultLanguage, TuringTranslate turingTranslate) { _speakText = speakText; _abstractLanguage = defaultLanguage; _turingTranslate = turingTranslate; }
public override int GetHashCode() { int hash = 1; if (PositionX != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PositionX); } if (PositionY != 0D) { hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(PositionY); } if (Width != 0) { hash ^= Width.GetHashCode(); } if (Height != 0) { hash ^= Height.GetHashCode(); } if (Direction != 0) { hash ^= Direction.GetHashCode(); } if (ObjType != 0) { hash ^= ObjType.GetHashCode(); } if (BlockType != 0) { hash ^= BlockType.GetHashCode(); } if (DishType != 0) { hash ^= DishType.GetHashCode(); } if (ToolType != 0) { hash ^= ToolType.GetHashCode(); } if (TriggerType != 0) { hash ^= TriggerType.GetHashCode(); } if (IsMoving != false) { hash ^= IsMoving.GetHashCode(); } hash ^= buff_.GetHashCode(); if (SpeakText.Length != 0) { hash ^= SpeakText.GetHashCode(); } if (Team != 0) { hash ^= Team.GetHashCode(); } if (SightRange != 0) { hash ^= SightRange.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }