12345678910111213141516171819202122232425262728293031323334 |
- using UnityEngine;
- namespace GFGGame
- {
- public class FullScreenTextController
- {
- public const string RESIN_TXT_DIR_PATH = "Assets/ResIn/Txt";
- public static string GetTxtPath(string res, string extName = "txt")
- {
- return $"{RESIN_TXT_DIR_PATH}/{res}.{extName}";
- }
- public static void Show(string eventName)
- {
- string content = null;
- switch (eventName)
- {
- case "event:a":
- content = GFGAsset.Load<TextAsset>(GetTxtPath("serviceProtocal")).text;
- break;
- case "event:b":
- content = GFGAsset.Load<TextAsset>(GetTxtPath("privacyPolicy")).text;
- break;
- case "event:c":
- content = GFGAsset.Load<TextAsset>(GetTxtPath("privacyPolicyChildren")).text;
- break;
- }
- if (!string.IsNullOrEmpty(content))
- {
- FullScreenTextView.Instance.Show(content);
- }
- }
- }
- }
|