private void enableThis(SingleChoiceDisplayer singleChoice) { //Enable the highlight of the this choice. highlightAnimator.enabled = true; //Disable the tile game object preparing for starting the typing animation paragraphTile.SetActive(true); //Before the animation is about to work disable the ability to change the language. // code goes here //Disable the lean Localized Text script before doing anything. leanLocalizedTxt.enabled = false; //Take or cut the text out of the text component and pass it to the typing text animator. typingAnimator.contentTxt = thisChoiceTxt; string temp = thisChoiceTxt.text; thisChoiceTxt.text = ""; //Animate the text and display it. typingAnimator.Play("", temp, leanLocalizedTxt, (LeanLocalization.CurrentLanguage.ToLower().Equals("arabic"))?TypingTextDirection.rtl: TypingTextDirection.ltr ); //Empty the text object of the typing text animator. //typingAnimator.contentTxt = null; //After finishing the animation turn the the LeanLocalizedScript On back again. //leanLocalizedTxt.enabled = true; //After the animation is finished enable the ability to change the language. // code goes here }
public void enableThisChoice(SingleChoiceDisplayer singleChoice) { singleChoice.disableAllChoicesButThis(); singleChoice.enableThis(singleChoice); }