コード例 #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
        private void Main()
        {
            VoicePitchUnlocker.Init();
            HairUnlocker.Init();

            SceneManager.sceneLoaded += (s, lsm) => SetAllSliders();
        }
コード例 #3
0
 private void Main() => VoicePitchUnlocker.Init();
コード例 #4
0
 internal void Main() => VoicePitchUnlocker.Init();