| | 1 | | using System.Collections; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | public class FeatureFlag |
| | 6 | | { |
| 843 | 7 | | public readonly Dictionary<string, bool> flags = new Dictionary<string, bool>(); |
| 843 | 8 | | public readonly Dictionary<string, FeatureFlagVariant> variants = new Dictionary<string, FeatureFlagVariant>(); |
| | 9 | |
|
| | 10 | | public bool IsFeatureEnabled(string featureName) |
| | 11 | | { |
| 29 | 12 | | if (flags.ContainsKey(featureName)) |
| 6 | 13 | | return flags[featureName]; |
| | 14 | |
|
| 23 | 15 | | return false; |
| | 16 | | } |
| | 17 | | } |
| | 18 | |
|
| | 19 | | public class FeatureFlagVariant |
| | 20 | | { |
| | 21 | | private string name; |
| | 22 | | private bool enable; |
| | 23 | | private Payload payload; |
| | 24 | |
|
| | 25 | | struct Payload |
| | 26 | | { |
| | 27 | | private string type; |
| | 28 | | private string value; |
| | 29 | | } |
| | 30 | | } |