Exemple #1
0
        protected void Awake()
        {
            Hooks.InstallHooks();

            VoicePitchUnlocker.Init();

            foreach (var type in typeof(CvsAccessory).Assembly.GetTypes())
            {
                if (type.Name.StartsWith("Cvs", StringComparison.OrdinalIgnoreCase) &&
                    type != typeof(CvsDrawCtrl) &&
                    type != typeof(CvsColor))
                {
                    var fields = type.GetFields(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);

                    var inputFields = fields.Where(x => typeof(TMP_InputField).IsAssignableFrom(x.FieldType)).ToList();
                    if (inputFields.Count == 0)
                    {
                        continue;
                    }

                    var sliders = fields.Where(x => typeof(Slider).IsAssignableFrom(x.FieldType)).ToList();
                    if (sliders.Count == 0)
                    {
                        continue;
                    }

                    var buttons = fields.Where(x => typeof(Button).IsAssignableFrom(x.FieldType)).ToList();

                    _targets.Add(new Target(type, inputFields, sliders, buttons));
                }
            }
        }
        private void Main()
        {
            VoicePitchUnlocker.Init();
            HairUnlocker.Init();

            SceneManager.sceneLoaded += (s, lsm) => SetAllSliders();
        }
 private void Main() => VoicePitchUnlocker.Init();
 internal void Main() => VoicePitchUnlocker.Init();