package
{
import flash.display.Sprite;
/***************************************************** *
* The Initial Developer of the Original Code is Jave.Lin(afeng).
*
* TestVectorSort.as
* Create By Jave.Lin(afeng)
* 2012-6-15 上午9:36:27
*
* [description]
*****************************************************/
public class TestVectorSort extends Sprite
{
public var itemArr:Vector.=new Vector.();
public function TestVectorSort()
{
super();
for (var i:int = 0; i < 10; i++)
{
var item:Item=new Item();
item.pos=Math.floor(Math.random()*100);
itemArr[i]=item;
}
trace(itemArr);
itemArr.sort(
function(a:Item,b:Item):int
{
if(a.pos>b.pos)return 1;
else if(a.pos
关注
打赏
热门博文
- 3D Assets (Textures & Model & Animations) & Game Design Ideas & DCC Tutorials & TA
- LearnGL - 学习笔记目录
- Unity - Timeline 知识汇总
- Unity Graphics - 知识点目录 - 停止翻译,因为发现官方有中文文档了
- Graphic资料
- Unity Lightmap&LightProbe局部动态加载(亲测2020以及以上版本官方修复了)
- Unity - 踩坑日志 - 低版本线性颜色空间渲染异常的 “BUG”
- Unity Shader - PBR 渲染 SP 导出的素材
- 什么是 3A 游戏?
- Photosohp - 实现 2D MetaBall、MetaFont