/// <summary> /// Should take place after agent is built AND WieldInitialWeapons is invoked /// </summary> /// <param name="agent"></param> private void AfterAgentSpawned(Agent agent) { var campaignAgent = new CampaignAgent(agent); if (_formationBanners.ContainsKey(campaignAgent.Formation) && _controller.AgentGetsFancyShield(campaignAgent)) { agent.SwitchShieldBanner(_formationBanners[campaignAgent.Formation]); } if (_controller.AgentIsEligible(campaignAgent) && _controller.AgentGetsBanner(campaignAgent)) { agent.RemoveFromEquipment(_forbiddenWeapons); agent.AddComponent(new DropBannerComponent(agent, _settings, _dropBannerController)); if (_formationBanners.ContainsKey(campaignAgent.Formation) && _controller.AgentGetsFancyBanner(campaignAgent)) { agent.EquipBanner(_formationBanners[campaignAgent.Formation]); } else { agent.EquipBanner(); } } }
/// <summary> /// Should take place after agent is built AND WieldInitialWeapons is invoked /// </summary> /// <param name="agent"></param> private void AfterAgentSpawned(Agent agent) { var battleAgent = new CustomBattleAgent(agent); if (_controller.AgentIsEligible(battleAgent) && _controller.AgentGetsBanner(battleAgent)) { agent.RemoveFromEquipment(_forbiddenWeapons); agent.AddComponent(new DropBannerComponent(agent, _settings, _dropBannerController)); } }
/// <summary> /// Should take place after agent is built AND WieldInitialWeapons is invoked /// </summary> /// <param name="agent"></param> private void AfterAgentSpawned(Agent agent) { var campaignAgent = new CampaignAgent(agent); if (_controller.PolybianUnitExists(campaignAgent)) { _controller.CountAgentForPolybian(campaignAgent); agent.SwitchShieldBanner(_controller.GetPolybianBannerForAgent(campaignAgent)); } if (_controller.AgentIsEligible(campaignAgent) && _controller.AgentGetsBanner(campaignAgent)) { agent.RemoveFromEquipment(_forbiddenWeapons); agent.AddComponent(new DropBannerComponent(agent, _settings, _dropBannerController)); } }