public override void Postspawn(EnemyAgent agent) { var projectileSetting = agent.GetComponentInChildren <EAB_ProjectileShooter>(true); if (projectileSetting != null) { if (FireSettings.Length > 1) { var clone = new EAB_ProjectileShooter() { m_burstCount = projectileSetting.m_burstCount, m_burstDelay = projectileSetting.m_burstDelay, m_shotDelayMin = projectileSetting.m_shotDelayMin, m_shotDelayMax = projectileSetting.m_shotDelayMax, m_initialFireDelay = projectileSetting.m_initialFireDelay, m_shotSpreadX = projectileSetting.m_shotSpreadX, m_shotSpreadY = projectileSetting.m_shotSpreadY }; var ability = agent.gameObject.AddComponent <ShooterDistSettingManager>(); ability.DefaultValue = clone; ability.EAB_Shooter = projectileSetting; ability.FireSettings = FireSettings; } else if (FireSettings.Length == 1) { FireSettings[0].ApplyToEAB(projectileSetting); } } }
public override void Prespawn(EnemyAgent agent) { var charMats = agent.GetComponentInChildren <CharacterMaterialHandler>().m_materialRefs; foreach (var mat in charMats) { var matName = mat.m_material.name; LogVerbose($" - Debug Info, Material Found: {matName}"); var swapSet = MaterialSets.SingleOrDefault(x => x.From.Equals(matName)); if (swapSet == null) { continue; } if (!_MatDict.TryGetValue(swapSet.To, out var newMat)) { Logger.Error($"MATERIAL IS NOT CACHED!: {swapSet.To}"); continue; } LogDev($" - Trying to Replace Material, Before: {matName} After: {newMat.name}"); mat.m_material = newMat; LogVerbose(" - Replaced!"); } }
public override void Postspawn(EnemyAgent agent) { var eabBirth = agent.GetComponentInChildren <EAB_Birthing>(true); if (eabBirth != null) { eabBirth.m_groupDataBlock = GameDataBlockBase <EnemyGroupDataBlock> .GetBlock(EnemyGroupToSpawn); eabBirth.m_childrenCost = ChildrenCost.GetAbsValue(eabBirth.m_childrenCost); eabBirth.m_childrenPerBirth = ChildrenPerBirth.GetAbsValue(eabBirth.m_childrenPerBirth); eabBirth.m_childrenAllowedSpawn = ChildrenPerBirth.GetAbsValue(eabBirth.m_childrenAllowedSpawn); eabBirth.m_childrenPerBirthMin = ChildrenPerBirthMin.GetAbsValue(eabBirth.m_childrenPerBirthMin); eabBirth.m_childrenMax = ChildrenMax.GetAbsValue(eabBirth.m_childrenMax); eabBirth.m_minDelayUntilNextBirth = MinDelayUntilNextBirth.GetAbsValue(eabBirth.m_minDelayUntilNextBirth); eabBirth.m_maxDelayUntilNextBirth = MaxDelayUntilNextBirth.GetAbsValue(eabBirth.m_maxDelayUntilNextBirth); } }
public override void Postspawn(EnemyAgent agent) { var eabFog = agent.GetComponentInChildren <EAB_FogSphere>(true); var fog = eabFog.m_fogSpherePrefab.GetComponent <FogSphereHandler>(); if (eabFog != null) { fog.m_colorMin = ColorMin; fog.m_colorMax = ColorMax; fog.m_intensityMin = IntensityMin; fog.m_intensityMax = IntensityMax; fog.m_rangeMin = RangeMin; fog.m_rangeMax = RangeMax; fog.m_densityMin = DensityMin; fog.m_densityMax = DensityMax; fog.m_densityAmountMin = DensityAmountMin; fog.m_densityAmountMax = DensityAmountMax; fog.m_totalLength = Duration; } }