Пример #1
0
    public void CreateCharacterInformationDisplay(GenericCharacter genericCharacter)
    {
        GameObject textManager = new GameObject("TextManager Charno: " + CharCount);

        textManager.transform.SetParent(m_Canvas.transform);
        Text nameHealthMana = textManager.AddComponent <Text>();

        nameHealthMana.font = m_Font;
        nameHealthMana.text = "Name: " + genericCharacter.GetCharacterName() +
                              " Health: " + genericCharacter.GetCharacterHealth() +
                              " Mana: " + genericCharacter.GetCharacterMana();

        if (GameManager.GetCombatManager.m_ActionUsersWithAffixes.ContainsKey(genericCharacter))
        {
            if (GameManager.GetCombatManager.m_ActionUsersWithAffixes[genericCharacter] != null)
            {
                nameHealthMana.text += " Affixes: " + GameManager.GetCombatManager.m_ActionUsersWithAffixes[genericCharacter][0];
            }
        }

        if (CharCount == 0)
        {
            nameHealthMana.rectTransform.localPosition = new Vector3(-400, 300, 0);
            CharCount++;
        }
        else
        {
            nameHealthMana.rectTransform.localPosition = new Vector3(400, 300, 0);
            CharCount--;
        }
    }
Пример #2
0
 private void ProcessHealingTaken(GenericCharacter aGenericCharacter, int aHealingValue)
 {
     aGenericCharacter.SetCurrentHealth(aGenericCharacter.GetCharacterHealth() + aHealingValue);
 }