Display power buffs
This commit is contained in:
parent
515602b670
commit
034e6beca6
8 changed files with 86 additions and 25 deletions
|
|
@ -11,16 +11,24 @@ public class StatusIconUI : MonoBehaviour
|
|||
|
||||
private BattleStatus status;
|
||||
|
||||
public void Init(BattleStatus status) {
|
||||
this.status = status;
|
||||
public void InitStatus(BattleStatus status) {
|
||||
Sprite sprite = Resources.Load<Sprite>(GetStatusResourcePath(status));
|
||||
this.statusImage.sprite = sprite;
|
||||
}
|
||||
|
||||
public void InitBuff(BuffType buffType) {
|
||||
Sprite sprite = Resources.Load<Sprite>(GetBuffResourcePath(buffType));
|
||||
this.statusImage.sprite = sprite;
|
||||
}
|
||||
|
||||
private static string GetStatusResourcePath(BattleStatus status) {
|
||||
return "BattleIcons/StatusIcon" + status;
|
||||
}
|
||||
|
||||
private static string GetBuffResourcePath(BuffType buffType) {
|
||||
return "BattleIcons/BuffIcon" + buffType;
|
||||
}
|
||||
|
||||
public void SetAmount(int amount, int index) {
|
||||
this.turnsText.text = "" + amount;
|
||||
this.transform.localPosition = new Vector2(-index * 22, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue