Vous ne pouvez pas sélectionner plus de 25 sujets
Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
|
- using System;
- using System.Collections.Generic;
- using SUISS.Core;
- using UnityEngine;
-
- namespace SUISSEngine
- {
- [Serializable]
- public class PlatformDependentSettings
- {
- public PlatformDependentSettings(List<string> keys)
- {
- this._keys = new List<string>();
- this._values = new List<string>();
- this._iosValues = new List<string>();
- this._androidValues = new List<string>();
- this._chineseValues = new List<string>();
- this._windowsStoreValues = new List<string>();
- this._cafeBazaarValues = new List<string>();
- this._amazonValues = new List<string>();
- this._osxStoreValues = new List<string>();
- foreach (string item in keys)
- {
- this._keys.Add(item);
- this._values.Add(string.Empty);
- this._iosValues.Add(string.Empty);
- this._androidValues.Add(string.Empty);
- this._chineseValues.Add(string.Empty);
- this._windowsStoreValues.Add(string.Empty);
- this._cafeBazaarValues.Add(string.Empty);
- this._amazonValues.Add(string.Empty);
- this._osxStoreValues.Add(string.Empty);
- }
- }
-
- protected IGameInterface gameInterface
- {
- get
- {
- if (this._gameInterface == null)
- {
- this._gameInterface = ServiceLocator.Find<IGameInterface>();
- }
- return this._gameInterface;
- }
- }
-
- public string GetSetting(string key)
- {
- int num = this._keys.FindIndex((string match) => match.Equals(key));
- if (this.gameInterface.GetCountryCode().ToLower() == "cn" && num >= 0 && num < this._chineseValues.Count && !string.IsNullOrEmpty(this._chineseValues[num]))
- {
- return this._chineseValues[num];
- }
- if (num >= 0 && num < this._androidValues.Count && !string.IsNullOrEmpty(this._androidValues[num]))
- {
- return this._androidValues[num];
- }
- if (num >= 0 && num < this._values.Count && !string.IsNullOrEmpty(this._values[num]))
- {
- return this._values[num];
- }
- return string.Empty;
- }
-
- private IGameInterface _gameInterface;
-
- [SerializeField]
- private List<string> _iosValues = new List<string>();
-
- [SerializeField]
- private List<string> _androidValues = new List<string>();
-
- [SerializeField]
- private List<string> _chineseValues = new List<string>();
-
- [SerializeField]
- private List<string> _windowsStoreValues = new List<string>();
-
- [SerializeField]
- private List<string> _cafeBazaarValues = new List<string>();
-
- [SerializeField]
- private List<string> _amazonValues = new List<string>();
-
- [SerializeField]
- private List<string> _osxStoreValues = new List<string>();
-
- [SerializeField]
- private List<string> _values = new List<string>();
-
- [SerializeField]
- private List<string> _keys;
- }
- }
|