任务22
CardUI 脚本 SetPosition 函数
if (card.BelongTo==CharacterType.Desk||card.BelongTo==CharacterType.Player)
{
transform.localPosition = Vector3.right * index* 20;
//防止还原
if (isSelected)
{
transform.localPosition += Vector3.up * 10;
}
{
transform.localPosition = Vector3.right * index* 20;
//防止还原
if (isSelected)
{
transform.localPosition += Vector3.up * 10;
}
if (card.BelongTo==CharacterType.ComputerLeft||card.BelongTo==CharacterType.ComputerRight)
{
transform.localPosition = -Vector3.up * 8 * index + Vector3.left * 8 * index;
}
}
{
transform.localPosition = -Vector3.up * 8 * index + Vector3.left * 8 * index;
}
}
第二个 if