public void setGangUnitInformation(int index, GameManager.Gang gang) { job = GameManager.Job.gang; this.gang = gang; this.index = index; transform.Find("Level").GetComponent <Text>().text = gang.level.ToString(); transform.Find("Price").GetComponent <Text>().text = ((int)gang.unitPrice()).ToString() + "만원"; transform.Find("Type").GetComponent <Text>().text = gang.GetType(); transform.Find("Character").GetComponent <Image>().sprite = gang.GetSprite(); }
public void SetUnitInformation(int index, GameManager.Gang gang) { this.index = index; job = 2; type = gang.type; string statusText = "Lv " + gang.level; statusText += gang.GetType() + " 갱단"; transform.Find("Status").GetComponent <Text>().text = statusText; transform.Find("Attack").GetComponent <Text>().text = gang.type == 4 ? "" : gang.attack().ToString(); transform.Find("Return").GetComponent <Text>().text = gang.type == 4 ? "" : gang.returnMoney().ToString(); Image icon = transform.Find("Icon").GetComponent <Image>(); Sprite sprite = gang.GetIcon(); if (sprite != null) { icon.sprite = sprite; } }