public virtual void AddCharacter (Character newChar) { while (mCharacters.ContainsKey (newChar.name.ToLower())) { newChar.name += "I"; } mCharacters.Add (newChar.name.ToLower(), newChar); newChar.transform.SetParent (mGroupComposition); if (OnGroupChanged != null) { OnGroupChanged (); } }
void Awake() { mTextComponent = GetComponent<Text> (); mAttachedCharacter = GetComponentInParent<Character> (); }