SCKeyboardBasePrompt.cs 841 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. using UnityEngine;
  3. using UnityEngine.UI;
  4. namespace SC.XR.Unity.Module_Keyboard
  5. {
  6. public class SCKeyboardBasePrompt : MonoBehaviour
  7. {
  8. protected int wordCount;
  9. public Text alreadyInput;
  10. public virtual void Init(Action<string> onPromptItemClick)
  11. {
  12. }
  13. public virtual int GetChinese(string englishWords)
  14. {
  15. wordCount = ChineseIMEManager.Instance.GetWordCount(englishWords);
  16. return wordCount;
  17. }
  18. public virtual string GetChinese(int index)
  19. {
  20. return ChineseIMEManager.Instance.GetWord(index);
  21. }
  22. public virtual string GetFirstChineseWord()
  23. {
  24. return "";
  25. }
  26. public virtual void SetEnteredText(string textStr)
  27. {
  28. }
  29. }
  30. }