示例#1
0
    public void RotationArrowClicked(Arrow arr)
    {
        this.direction = arr.direction;

        if ((int)direction < 2 || (int)direction == 5)
        {
            isFacingRight = true;
        }
        else
        {
            isFacingRight = false;
        }
        if (isFacingRight)
        {
            GetComponentInChildren <SpriteRenderer>().flipX = false;
        }
        else
        {
            GetComponentInChildren <SpriteRenderer>().flipX = true;
        }

        GetComponentInChildren <UnitDirection>().SetNewDirectionAndRotion(this.direction);
        fieldOfVisionTiles = gridscr.ClearFogNormalVision(transform.position, direction, 6);
        LocalPlayer.HandleFogOfWarHide();
    }