public string GetText(E_TextEnum Val) { if ((Val & E_TextEnum.ATT0) != 0) { return(Att0.GetComponentInChildren <Text>().text); } if ((Val & E_TextEnum.ATT1) != 0) { return(Att1.GetComponentInChildren <Text>().text); } if ((Val & E_TextEnum.ATT2) != 0) { return(Att2.GetComponentInChildren <Text>().text); } if ((Val & E_TextEnum.ATT3) != 0) { return(Att3.GetComponentInChildren <Text>().text); } if ((Val & E_TextEnum.HPATT) != 0) { return(HpAtt.text); } if ((Val & E_TextEnum.HPCIBLE) != 0) { return(HpCible.text); } if ((Val & E_TextEnum.MANAATT) != 0) { return(ManaAtt.text); } if ((Val & E_TextEnum.MANACIBLE) != 0) { return(ManaCible.text); } return(""); }
public void SetText(string txt, E_TextEnum flg) { if ((flg & E_TextEnum.ATT0) != 0) { Att0.GetComponentInChildren <Text>().text = txt; } else if ((flg & E_TextEnum.ATT1) != 0) { Att1.GetComponentInChildren <Text>().text = txt; } else if ((flg & E_TextEnum.ATT2) != 0) { Att2.GetComponentInChildren <Text>().text = txt; } else if ((flg & E_TextEnum.ATT3) != 0) { Att3.GetComponentInChildren <Text>().text = txt; } else if ((flg & E_TextEnum.HPATT) != 0) { HpAtt.text = txt; } else if ((flg & E_TextEnum.HPCIBLE) != 0) { HpCible.text = txt; } else if ((flg & E_TextEnum.MANAATT) != 0) { ManaAtt.text = txt; } else if ((flg & E_TextEnum.MANACIBLE) != 0) { ManaCible.text = txt; } }