Add some art, fix UI anchors
This commit is contained in:
parent
c31747bc19
commit
0ca4c3276d
22 changed files with 542 additions and 65 deletions
|
|
@ -16,14 +16,23 @@ public class CardUI : MonoBehaviour
|
|||
this.typeText.text = card.GetDisplayType();
|
||||
this.costText.text = "" + card.GetCost();
|
||||
this.effectText.text = card.GetEffectText();
|
||||
Sprite sprite = Resources.Load<Sprite>(GetCardArtResourcePath(card));
|
||||
this.artImage.sprite = sprite;
|
||||
}
|
||||
|
||||
public void InitHidden() {
|
||||
Color BROWN = new Color(0.14f, 0.09f, 0.04f);
|
||||
this.nameText.text = "????";
|
||||
this.typeText.text = "????";
|
||||
this.costText.text = "????";
|
||||
this.effectText.text = "????";
|
||||
this.GetComponent<Image>().color = Color.black;
|
||||
this.GetComponent<Image>().color = BROWN;
|
||||
this.artImage.color = BROWN;
|
||||
}
|
||||
|
||||
public string GetCardArtResourcePath(BaseCard card) {
|
||||
return "CardArt/" + (card.Owner.Team == TeamChoice.Heroes? "Hero" : "Monster")
|
||||
+ card.StringId;
|
||||
}
|
||||
|
||||
// Start is called before the first frame update
|
||||
|
|
@ -41,6 +50,7 @@ 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,8 +219,6 @@ MonoBehaviour:
|
|||
costText: {fileID: 6834692580065399204}
|
||||
artImage: {fileID: 8419538927331240723}
|
||||
effectText: {fileID: 2477879197027808366}
|
||||
normalMaterial: {fileID: 0}
|
||||
disabledMaterial: {fileID: 0}
|
||||
--- !u!1 &2477879197027808364
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -255,8 +253,8 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -41.68}
|
||||
m_SizeDelta: {x: -8, y: -91.37523}
|
||||
m_AnchoredPosition: {x: 0, y: -48.86}
|
||||
m_SizeDelta: {x: -8, y: -105.724106}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2477879197027808367
|
||||
CanvasRenderer:
|
||||
|
|
@ -287,7 +285,7 @@ MonoBehaviour:
|
|||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 12
|
||||
m_FontSize: 10
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 1
|
||||
|
|
@ -333,8 +331,8 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 1, y: 18}
|
||||
m_SizeDelta: {x: 112, y: 48}
|
||||
m_AnchoredPosition: {x: -0.11389, y: 11.333}
|
||||
m_SizeDelta: {x: 114.22778, y: 64.87021}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2144677943642500384
|
||||
CanvasRenderer:
|
||||
|
|
@ -357,7 +355,7 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.3207547, g: 0.28062788, b: 0.27082592, a: 1}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
|
|
@ -407,8 +405,8 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 40.35, y: 49}
|
||||
m_SizeDelta: {x: -88.7, y: -138}
|
||||
m_AnchoredPosition: {x: 40.35, y: 50}
|
||||
m_SizeDelta: {x: -88.7, y: -136}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7591601241322559362
|
||||
CanvasRenderer:
|
||||
|
|
@ -485,8 +483,8 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -19.96, y: 49}
|
||||
m_SizeDelta: {x: -47.914093, y: -138}
|
||||
m_AnchoredPosition: {x: -19.96, y: 50}
|
||||
m_SizeDelta: {x: -47.914093, y: -136}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4222329136353876023
|
||||
CanvasRenderer:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue