调整卡牌攻击
- 场上存在卡牌时无法直接攻击敌方玩家 - 取消卡牌攻击敌方玩家高亮显示 - 一回合只能上场一张角色卡
This commit is contained in:
@@ -33,9 +33,15 @@ namespace TcgEngine.UI
|
||||
|
||||
public void Refresh()
|
||||
{
|
||||
if (icons == null)
|
||||
return;
|
||||
|
||||
int index = 0;
|
||||
foreach (Image icon in icons)
|
||||
{
|
||||
if (icon == null)
|
||||
continue;
|
||||
|
||||
icon.gameObject.SetActive(index < value || index < max_value);
|
||||
icon.sprite = (index < value) ? sprite_full : sprite_empty;
|
||||
index++;
|
||||
@@ -44,9 +50,13 @@ namespace TcgEngine.UI
|
||||
|
||||
public void SetMat(Material mat)
|
||||
{
|
||||
if (icons == null)
|
||||
return;
|
||||
|
||||
foreach (Image icon in icons)
|
||||
{
|
||||
icon.material = mat;
|
||||
if (icon != null)
|
||||
icon.material = mat;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user