public void BattleDisplaySelf(Damagable target, Vector3 pos, string text = "") { GameObject temp = Instantiate(ImageHolder, pos, Quaternion.identity); temp.transform.SetParent(this.gameObject.transform, false); temp.GetComponent <Image>().sprite = target.getImages()[0]; temp.GetComponentInChildren <Text>().text = text; Destroy(temp, 1.8f); }
public void setChar(Damagable character, GameObject background) { Char = character; backdrop = background; HealthBar = Instantiate(healthBar, new Vector3(0, 0, 0), Quaternion.identity); HealthBar.transform.SetParent(this.gameObject.transform, false); HealthBar.SetHealthBar(Char); this.gameObject.GetComponent <Image>().sprite = Char.getImages()[0]; this.gameObject.transform.SetParent(backdrop.transform, false); }
public void enemyDie() { this.gameObject.GetComponent <Image>().sprite = Char.getImages()[3]; }
public void updateChar(Damagable character) { Char = character; this.gameObject.GetComponent <Image>().sprite = Char.getImages()[0]; HealthBar.SetHealthBar(Char); }