Show playable cards in enemy hand
This commit is contained in:
parent
d513657396
commit
b654419966
5 changed files with 22 additions and 7 deletions
|
|
@ -11,7 +11,10 @@ public class CardUI : MonoBehaviour
|
|||
public Image artImage;
|
||||
public Text effectText;
|
||||
|
||||
private bool hidden;
|
||||
|
||||
public void Init(BaseCard card) {
|
||||
this.hidden = false;
|
||||
this.nameText.text = card.GetDisplayName();
|
||||
this.typeText.text = card.GetDisplayType();
|
||||
if (card.Type != CardType.Emotion) {
|
||||
|
|
@ -25,6 +28,7 @@ public class CardUI : MonoBehaviour
|
|||
}
|
||||
|
||||
public void InitHidden() {
|
||||
this.hidden = true;
|
||||
Color BROWN = new Color(0.14f, 0.09f, 0.04f);
|
||||
this.nameText.text = "????";
|
||||
this.typeText.text = "????";
|
||||
|
|
@ -53,8 +57,10 @@ public class CardUI : MonoBehaviour
|
|||
|
||||
public bool Playable {
|
||||
set {
|
||||
this.GetComponent<Image>().color = value ? Color.white : Color.grey;
|
||||
this.artImage.color = value ? Color.white : Color.grey;
|
||||
if (!this.hidden) {
|
||||
this.GetComponent<Image>().color = value ? Color.white : Color.grey;
|
||||
this.artImage.color = value ? Color.white : Color.grey;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue