protected virtual void InitializeAlly(RTSAllyComponentSpecificFields _specific, RTSAllyComponentsAllCharacterFields _allFields) { AllyFaction = _specific.AllyFaction; GeneralCommander = _specific.GeneralCommander; if (_allFields.bBuildLOSChildObject) { LOSTransform = _specific.LOSChildObjectTransform; } if (gamemode == null) { Debug.LogError("No gamemode on ai player!"); } //Add Ally to PartyMembers Rather than Finding them //To Make Spawning Easier if (partyManager != null) { partyManager.AddPartyMember(this); } //Create Overrideable Late Start to Accommodate //Assets Having Long StartUp Invoke("OnDelayStart", 0.5f); StartServices(); }
public virtual PartyStats RetrievePartyStats(PartyManager _party, RTSGameMode.ECommanders _commander) { CheckForDictionaryInit(); if (PartyStatDictionary.ContainsKey(_commander)) { return(PartyStatDictionary[_commander]); } Debug.Log("Commander: " + _commander.ToString() + " could not be found"); return(new PartyStats { Commander = RTSGameMode.ECommanders.Commander_06, healthPotionAmount = 0 }); }