Exemple #1
0
    public void BaseButtonInputs()
    {
        if (Input.GetMouseButtonDown(0))
        {
            baseButtonController.OnButtonDown();
        }
        if (Input.GetMouseButton(0))
        {
            baseButtonController.OnButton();
        }

        if (Input.GetMouseButtonUp(0))
        {
            baseButtonController.OnButtonUp();
        }

        if (Input.GetMouseButtonUp(1))
        {
            scaleManager.ToggleGroup();
        }

        if (Input.GetKeyDown(KeyCode.Alpha1))
        {
            slotManager.SelectSlot(0);
        }

        if (Input.GetKeyDown(KeyCode.Alpha2))
        {
            slotManager.SelectSlot(1);
        }

        if (Input.GetKeyDown(KeyCode.Alpha3))
        {
            slotManager.SelectSlot(2);
        }

        if (Input.GetKeyDown(KeyCode.Alpha4))
        {
            slotManager.SelectSlot(3);
        }

        if (Input.GetKeyDown(KeyCode.Alpha5))
        {
            slotManager.SelectSlot(4);
        }
        if (Input.GetKeyDown(KeyCode.Alpha6) || Input.GetKeyDown(KeyCode.M))
        {
            slotManager.SelectSlot(5);
        }

        if (Input.GetKeyDown(KeyCode.C))
        {
            colorController.OnColorToggle();
        }
    }
 public void ApplyScale()
 {
     selectionGroup.localScale = Vector3.one * scaleManager.slider.value;
     scaleManager.ToggleGroup();
 }