Пример #1
0
        private void HorizontallyMoveSelector(int direction = 1)
        {
            switch (direction)
            {
            case 1:
                if (!dPadActive && Mathf.Abs(Input.GetAxis("DPadHorizontal")) == 1)
                {
                    if (Input.GetAxis("DPadHorizontal") > 0 && controlRowColCurrentHoverIndex < controlRowColNumOfChars - 1)
                    {
                        controlRowCol.SetCurrentHoverCharacter(controlRowColCurrentHoverIndex + 1);
                    }
                    else if (Input.GetAxis("DPadHorizontal") < 0 && controlRowColCurrentHoverIndex > 0)
                    {
                        controlRowCol.SetCurrentHoverCharacter(controlRowColCurrentHoverIndex - 1);
                    }

                    CheckCrossingIndex();

                    dPadActive = true;
                }
                else if (dPadActive && Input.GetAxis("DPadHorizontal") == 0)
                {
                    dPadActive = false;
                }

                break;

            case 2:

                Debug.Log("Switch to horizontal movement");

                break;
            }
        }
Пример #2
0
        private void InitializeCrossword()
        {
            controlRowCol = allRowCols[0];

            currentRowCols[0] = controlRowCol;

            controlRowCol.gameObject.SetActive(true);

            controlRowCol.SetCurrentHoverCharacter(0);

            controlRowColNumOfChars = controlRowCol.GetNumCharSlots();

            CalculateMovementDirection();
        }