コード例 #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));
                }
            }
        }
コード例 #2
0
        protected void Awake()
        {
            Minimum = Config.Bind("Slider Limits", "Minimum slider value", -100, new ConfigDescription("Changes will take effect next time the editor is loaded or a character is loaded.", new AcceptableValueRange <int>(-500, 0)));
            Maximum = Config.Bind("Slider Limits", "Maximum slider value", 200, new ConfigDescription("Changes will take effect next time the editor is loaded or a character is loaded.", new AcceptableValueRange <int>(100, 500)));

            Hooks.InstallHooks();
            Logger = base.Logger;
        }
コード例 #3
0
 void Awake()
 {
     Hooks.InstallHooks();
 }
コード例 #4
0
 protected void Awake()
 {
     Hooks.InstallHooks();
 }
コード例 #5
0
 protected void Awake()
 {
     Hooks.InstallHooks();
     Logger = base.Logger;
 }