示例#1
0
    void OnTouchStay()
    {
        isHovering = true;

        if (!addSquareHasBeenCalled && interactable)
        {
            if (hammerOn)
            {
                animator.Play("Default");

                lineScript.FallOne(number);
            }

            else if (removeOn)
            {
                lineScript.EndRemove();
                lineScript.FallOneColor(colorNum);
            }

            else
            {
                if (!addSquareHasBeenCalled && interactable)
                {
                    lineScript.AddSquare(number, colorNum, hoverSwitch);
                }
            }

            addSquareHasBeenCalled = true;
        }
    }