1.卡牌翻转效果Turn();
private void Turn()
{
if (DOTween.IsTweening(cardButton))
{
return;
}
toOpen = !toOpen;
DOTween.To(() => 0, x =>
{
if (toOpen)
{
cardBack.rotationY = x;
cardFront.rotationY = -180 + x;
if (x > 90)
{
cardBack.visible = true;
cardFront.visible = false;
}
}
else
{
cardBack.rotationY = -180 + x;
cardFront.rotationY = x;
if (x > 90)
{
cardBack.visible = false;
cardFront.visible = true;
}
}
}, 180, 0.5f).SetTarget(cardButton).SetEase(Ease.OutQuad);
}