Esempio n. 1
0
        private void RegisterCustomSubCategories(object sender, RegisterSubCategoriesEvent e)
        {
            Transform camLight = GameObject.Find("CustomScene/CamBase/Camera/Directional Light").transform;

            lockCamlightToggle = e.AddSidebarControl(new SidebarToggle("Lock Cameralight", DefaultLockCameralight.Value, this));
            lockCamlightToggle.ValueChanged.Subscribe(x =>
            {
                if (camLight == null)
                {
                    return;
                }

                if (x)
                {
                    oldParent = camLight.parent.gameObject;

                    newParent = new GameObject("CamLightLock");
                    newParent.transform.position    = oldParent.transform.position;
                    newParent.transform.eulerAngles = oldParent.transform.eulerAngles;

                    camLight.parent = newParent.transform;
                }
                else if (oldParent != null)
                {
                    camLight.parent = oldParent.transform;

                    camLight.transform.localEulerAngles = new Vector3(0, 3, 0);

                    Destroy(newParent);
                    newParent = null;
                }
            });
        }
Esempio n. 2
0
        private void MakerAPI_Enter(object sender, RegisterCustomControlsEvent e)
        {
            cc        = MakerAPI.GetCharacterControl();
            blinkFlag = cc.GetEyesBlinkFlag();
            //Logger.LogDebug("on enter: " + blinkFlag);

            sidebarToggle       = e.AddSidebarControl(new SidebarToggle("Disable eye blink", true, this));
            sidebarToggle.Value = blinkFlag;
            sidebarToggle.ValueChanged.Subscribe(b => BlinkToggle()); //need to fix so BlinkToggle doesn't get called when control is created
        }
Esempio n. 3
0
        private void Start()
        {
            MakerAPI.RegisterCustomSubCategories += (sender, e) =>
            {
                EnableAAA = false;
                var toggle = new SidebarToggle("Anime Ass Assistant", false, this);
                e.AddSidebarControl(toggle).ValueChanged.Subscribe(x => EnableAAA = x);
                gameObject.GetOrAddComponent <Assistant>();
            };

            MakerAPI.MakerExiting += (sender, e) => Destroy(gameObject.GetComponent <Assistant>());
        }
Esempio n. 4
0
        private void Start()
        {
            ShowInMaker = Config.Bind("General", "Show in Character Maker", false, "Show the clothing state menu in character maker. Can be enabled from maker interface or by pressing the keyboard shortcut.");
            ShowInMaker.SettingChanged += (sender, args) =>
            {
                if (MakerAPI.InsideMaker)
                {
                    ShowInterface = ShowInMaker.Value;
                }
            };

#if KK || KKS
            ShowCoordinateButtons = Config.Bind("General", "Show coordinate change buttons in Character Maker", false, "Adds buttons to the menu that allow quickly switching between clothing sets. Same as using the clothing dropdown.\nThe buttons are always shown outside of character maker.");
            ShowCoordinateButtons.SettingChanged += (sender, args) =>
            {
                if (ShowInterface)
                {
                    ShowInterface = true;
                }
            };
#endif

            Keybind = Config.Bind("General", "Toggle clothing state menu", new KeyboardShortcut(KeyCode.Tab, KeyCode.LeftShift), "Keyboard shortcut to toggle the clothing state menu on and off.\nCan be used outside of character maker in some cases - works for males in H scenes (the male has to be visible for the menu to appear) and in some conversations with girls.");

            MakerAPI.RegisterCustomSubCategories += (sender, e) =>
            {
                _sidebarToggle = e.AddSidebarControl(new SidebarToggle("Show clothing state menu", ShowInMaker.Value, this));
                _sidebarToggle.ValueChanged.Subscribe(b => ShowInterface = b);
            };
            MakerAPI.MakerExiting += (sender, e) =>
            {
                _chaCtrl = null;
#if KK || KKS
                _setCoordAction = null;
#endif
                _sidebarToggle = null;
            };
        }
Esempio n. 5
0
 private void OnDestroy()
 {
     lockCamlightToggle = null;
 }
Esempio n. 6
0
 private void OnDestroy()
 {
     sidebarToggle = null;
     Logger.LogDebug("blinkCtrl sidebarToggle destroyed");
 }