SpellCastTargets targets = SpellCastTargets::SelectTargetsInRange(spellRange, casterPosition, enemyPositions); if (targets.count > 0) { Enemy enemy = ChooseRandomEnemy(targets.enemiesInRange); caster.CastSpellOnEnemy(enemy, spell); }
SpellCastTargets targets = SpellCastTargets::SelectTargetsInRadius(healingRadius, casterPosition, friendlyPositions); if (targets.count > 0) { foreach (FriendlyUnit friendly in targets.friendlyUnitsInRange) { friendly.Heal(healingAmount); } }These examples suggest that SpellCastTargets may be a part of a gaming or simulation library that allows developers to easily implement spell-casting or ability-targeting mechanics. However, without more context or information about the libraries and packages being used, it's difficult to say for sure which specific library or package SpellCastTargets belongs to.