Пример #1
0
        protected virtual void SetInitialReferences()
        {
            //allyEventHandler = GetComponent<AllyEventHandler>();
            //aiController = GetComponent<AllyAIController>();
            //allyStatController = GetComponent<AllyStatController>();

            if (partyManager == null)
            {
                Debug.LogError("No partymanager on allymember!");
            }
            if (allyEventHandler == null)
            {
                Debug.LogError("No eventHandler on allymember!");
            }
            if (aiController == null)
            {
                Debug.LogError("No aiController on allymember!");
            }
            if (allyStatController == null)
            {
                Debug.LogError("No allyStatController on allymember!");
            }

            if (AllyFaction == RTSGameMode.EFactions.Faction_Default)
            {
                AllyFaction = RTSGameMode.EFactions.Faction_Allies;
            }
        }
Пример #2
0
        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();
        }