Пример #1
0
        public DebugVar[] GetMembers(string[] categories)
        {
            List <string>   aux    = new(categories);
            List <DebugVar> result = new();


            var debugPages = ReflectionExtend.CreateDerivedInstances <DebugScreenVarsNative>();

            foreach (var debugPage in debugPages)
            {
                var methods = ReflectionExtend.GetMethodsWithSpecificAttribute <DebugScreenAttribute>(ArrayExtend.CreateArray(debugPage), (DebugScreenAttribute attr) =>
                {
                    return(aux != null && aux.Contains(attr.DebugCategory));
                });

                foreach (var method in methods)
                {
                    var    member = method.Invoke <MemberComplexInfo>();
                    string name   = "";
                    if (member != null)
                    {
                        name = ReflectionExtend.GetValueAttribute(method.methodInfo, (DebugScreenAttribute attr) =>
                        {
                            return(attr.DebugName);
                        });


                        result.Add(new DebugVar(name, member));
                    }
                }
            }

            return(result.ToArray());
        }
Пример #2
0
 public static void LoadString(string NameStoredVar, string value, MemberComplexInfo memberInfo)
 {
     if (NameStoredVar != null)
     {
         string result = PlayerPrefs.GetString(NameStoredVar, value);
         ReflectionExtend.SetValue(memberInfo, result);
     }
 }
Пример #3
0
 public static void LoadBool(string NameStoredVar, bool value, MemberComplexInfo memberInfo)
 {
     if (NameStoredVar != null)
     {
         bool result = GetBool(NameStoredVar, value);
         ReflectionExtend.SetValue(memberInfo, result);
     }
 }
Пример #4
0
 public static void LoadFloat(string NameStoredVar, float value, MemberComplexInfo memberInfo)
 {
     if (NameStoredVar != null)
     {
         float result = PlayerPrefs.GetFloat(NameStoredVar, value);
         ReflectionExtend.SetValue(memberInfo, result);
     }
 }
Пример #5
0
        protected override void Awake()
        {
            base.Awake();

            if (useFiller && textFillerType != null)
            {
                _filler = ReflectionExtend.CreateInstance <Filler <string> >(textFillerType);
            }
        }
Пример #6
0
        protected override void Awake()
        {
            base.Awake();

            if (useFiller && imageFillerType != null)
            {
                _filler = ReflectionExtend.CreateInstance <Filler <ImageElementInfo> >(imageFillerType);
            }
        }
Пример #7
0
 public MemberComplexInfo TimerLActiveLenght()
 {
     return(ReflectionExtend.GetValueInfo <TimerContainer>("_timersPool", "Actives", "Count"));
 }
Пример #8
0
 public MemberComplexInfo TweenLActiveLenght()
 {
     return(ReflectionExtend.GetValueInfo <TweenContainer>("_containerPool", "Actives", "Count"));
 }