public virtual AsVector <AsTexture> getTextures(String prefix) { AsVector <AsTexture> textures = new AsVector <AsTexture>(); AsVector <String> names = new AsVector <String>(); AsDictionary __names_ = mTextureRegions; if (__names_ != null) { foreach (String name in __names_) { if (AsString.indexOf(name, prefix) == 0) { names.push(name); } } } names.sort(AsArray.CASEINSENSITIVE); AsVector <String> __names_ = names; if (__names_ != null) { foreach (String name in __names_) { textures.push(getTexture(name)); } } return(textures); }
public void testSort() { AsVector<int> vector = new AsVector<int>(); vector.push(3); vector.push(1); vector.push(4); vector.push(0); vector.sort(sorter); List<int> list = vector.internalList; foreach (int i in list) { Console.WriteLine(i); } Assert.AreEqual(vector[0] == 0 && vector[1] == 1 && vector[2] == 3 && vector[3] == 4, true); }
public virtual AsVector<AsTexture> getTextures(String prefix) { AsVector<AsTexture> textures = new AsVector<AsTexture>(); AsVector<String> names = new AsVector<String>(); AsDictionary __names_ = mTextureRegions; if (__names_ != null) { foreach (String name in __names_) { if(AsString.indexOf(name, prefix) == 0) { names.push(name); } } } names.sort(AsArray.CASEINSENSITIVE); AsVector<String> __names_ = names; if (__names_ != null) { foreach (String name in __names_) { textures.push(getTexture(name)); } } return textures; }
public virtual void sortChildren(AsDisplayObjectContainerCompareFunction compareFunction) { mChildren = mChildren.sort(compareFunction); }