예제 #1
0
    void Update()
    {
        if (ci.MoveLeft(player))
        {
            moveRawImage.texture = moveActiveIcon;
        }
        else if (ci.MoveRight(player))
        {
            moveRawImage.texture = moveActiveIcon;
        }
        else
        {
            moveRawImage.texture = moveIcon;
        }

        if (ci.RotLeft(player))
        {
            rotRawImage.texture = rotActiveIcon;
        }
        else if (ci.RotRight(player))
        {
            rotRawImage.texture = rotActiveIcon;
        }
        else
        {
            rotRawImage.texture = rotIcon;
        }

        if (ci.MoveDownCombined())
        {
            downRawImage.texture = downActiveIcon;
        }
        else if (ci.MoveDown(1))
        {
            downRawImage.texture = downLeftIcon;
        }
        else if (ci.MoveDown(2))
        {
            downRawImage.texture = downRightIcon;
        }
        else
        {
            downRawImage.texture = downIcon;
        }

        //moveRawImage.transform.eulerAngles = new Vector3(0, 0, -40 *  ci.MoveTilt(player));
        //rotRawImage.transform.eulerAngles = new Vector3(0, 0, -45 *  ci.RotTilt(player));
    }