| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- #if UNITY_EDITOR
- using UnityEditor;
- #endif
- namespace AppUI.Config
- {
- [System.Serializable]
- public class GamePlayInfo
- {
- public string ScoreType;
- public int PlayTime;
- public int GameType;
- }
- public static class GlobalConfig
- {
- // 箭重
- public static readonly float[] ArrowWeights =
- {
- 20f,
- 27f,
- 30.5f
- };
- // 按钮值
- public static readonly int[] Buttons =
- {
- 0,
- 1
- };
- // 按钮文字
- public static readonly string[] ButtonStrs =
- {
- "ON",
- "OFF"
- };
- public static readonly LanguageEnum[] UILanguages =
- {
- LanguageEnum.English,
- LanguageEnum.Japan,
- LanguageEnum.Chinese
- };
- public static readonly string[] LanguageTexts =
- {
- "English",
- "日本語",
- "中文"
- };
- public static readonly int[] ShootLevels = { 0, 1, 2 };
- public static readonly string[] ShootLevelStrs = { "Easy", "Normal", "Hard" };
- /// <summary>
- /// 用于版本文案等展示:真机读 <see cref="Application.platform"/>;Editor 读 Build Target(避免 WindowsEditor)。
- /// </summary>
- public static string GetPlatformDisplayName()
- {
- #if UNITY_EDITOR
- switch (EditorUserBuildSettings.activeBuildTarget)
- {
- case BuildTarget.Android:
- return "Android";
- case BuildTarget.iOS:
- return "iOS";
- default:
- return "Android";
- }
- #else
- switch (Application.platform)
- {
- case RuntimePlatform.Android:
- return "Android";
- case RuntimePlatform.IPhonePlayer:
- return "iOS";
- default:
- return Application.platform.ToString();
- }
- #endif
- }
- }
- }
|