public static TargetingType ConvertTargetingType(MagicTypeEnum type) { TargetTypeLookup.TryGetValue(type, out var found); return(found); }
public static UseType Convert(MagicTypeEnum type) { UseTypeLookup.TryGetValue(type, out var found); return(found); }
private static IEnumerable <(YiObj, int)> GetTargets(YiObj player, Vector2 loc, MagicTypeEnum magicType) { var targetList = new List <(YiObj, int)>(); switch (MagicTypeHelper.ConvertTargetingType(magicType)) { case TargetingType.Single: Single(player, targetList); break; case TargetingType.Sector: Sector(player, loc, targetList); break; case TargetingType.Circle: Circle(player, targetList); break; case TargetingType.Self: targetList.Add((player, 0)); break; } return(targetList); }