Пример #1
0
        private void SelectCharacter()
        {
            if (Input.GetButtonDown("Submit"))
            {
                selectionState = SelectionState.NUMERALS;

                if (currentCharacter.HasAttachedWire())
                {
                    currentCharacter.ToggleWireAttached(false, null);

                    currentCharacter.ToggleWireAttached(true, numerals[currentNumeralFinger]);
                }
                else
                {
                    currentCharacter.ToggleWireAttached(true, numerals[currentNumeralFinger]);
                }


                characterFingers[currentCharacterFinger].SetActive(false);

                currentNumeralFinger = 0;

                currentNumeral = numerals[currentNumeralFinger];

                numeralFingers[currentNumeralFinger].SetActive(true);

                CheckIfSolved();
            }
        }
Пример #2
0
        public void ToggleWireAttached(bool isAttached, WireNumeral attachedNumeral)
        {
            if (!isAttached)
            {
                currentAttachedNumeral.IsWireDisconnected(true);
            }

            isWireAttached         = isAttached;
            currentAttachedNumeral = attachedNumeral;
        }
Пример #3
0
        private void ResetPuzzle()
        {
            selectionState = SelectionState.NUMERALS;

            currentNumeral = numerals[0];

            currentCharacter = null;

            numeralFingers[currentNumeralFinger].SetActive(false);
        }
Пример #4
0
        private void InitializePuzzle()
        {
            ChooseNumeralAndCharacterPairs();

            SetNumerals();

            SetCharacters();

            numeralFingers[currentNumeralFinger].SetActive(true);

            currentNumeral = numerals[currentNumeralFinger];
        }
Пример #5
0
 private void UnsetNumeralAndFinger()
 {
     currentNumeral = null;
     numeralFingers[currentNumeralFinger].SetActive(false);
 }
Пример #6
0
 private void SetNumeralAndFinger()
 {
     currentNumeral = numerals[currentNumeralFinger];
     numeralFingers[currentNumeralFinger].SetActive(true);
 }