Example #1
0
    public void removeCharacter(Character characterObject)
    {
        CharacterInfoObject charInfo = logItemList[characterObject.CharID];

        logItemList.Remove(characterObject.CharID);
        Destroy(charInfo.gameObject);
        LayoutRebuilder.ForceRebuildLayoutImmediate(GetComponent <RectTransform>());
    }
Example #2
0
    public void newCharacter(Character characterObject)
    {
        CharacterInfoObject newItem = Instantiate(logItemProto, transform.position, transform.rotation, transform) as CharacterInfoObject;

        LayoutRebuilder.ForceRebuildLayoutImmediate(GetComponent <RectTransform>());
        newItem.Description.supportRichText = true;
        newItem.Description.text            = characterObject.Name + "\n" + "<color=red>Health:</color>" + characterObject.getStat("Health");
        Debug.Log("Name: " + characterObject.Name + " ID: " + characterObject.CharID);
        logItemList.Add(characterObject.CharID, newItem);
    }
Example #3
0
    public void updateCharacterInfo(Character characterObject)
    {
        CharacterInfoObject charInfo = logItemList[characterObject.CharID];

        charInfo.Description.text = characterObject.Name + "\n" + "<color=red>Health:</color>" + characterObject.getStat("Health");
    }
Example #4
0
 void setCharacterInfo()
 {
     CharacterInfoObject lCharacterInfoObject
         = gameObject.GetComponent<CharacterInfoObject>();
     if (!lCharacterInfoObject)
         lCharacterInfoObject = gameObject.AddComponent<CharacterInfoObject>();
     characterInfoObject = lCharacterInfoObject;
 }