Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void SortByAttack(List<Individual> original)
- {
- List<Individual> muhUnitbyAtk = original.OrderBy(o =>o.GetAtk).ToList();
- original.Clear;
- //after this you want to copy the new ordered list into the original
- //there are two wasy that i found
- original = muhUnitbyAtk.ToList(); //I think you need another library for this one
- original.AddRange(muhUnitbyAtk); // this is the one I recommend
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement