Hello,
I have an array or gameObjects:
var InitiativeMinis = new Array();
And each objects name is a basic intger (Stored as a string because it’s the name of the object)
I need to sort these objects based on their names, highest to lowest. Please only reply in Javascript as that’s what my entire project uses.
Here is my current sort routine which i know is wrong (it is sorting the names as strings), but that’s why I’m asking for help.
InitiativeMinis.Sort(NameCompare);
function NameCompare(a : System.Object, b : System.Object) : int
{
return CaseInsensitiveComparer().Compare(a.name,b.name);
}