Created
June 29, 2012 02:16
-
-
Save lizhi525/3015247 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import flash.display.*; | |
import net.game_develop.animation.bmp.*; | |
import net.game_develop.animation.gpu.*; | |
import net.game_develop.animation.gpu.display.*; | |
import net.hires.debug.*; | |
/** | |
* ... | |
* @author lizhi http://game-develop.net/ | |
*/ | |
public class ARE2DTest1 extends GpuView2d | |
{ | |
public function ARE2DTest1() | |
{ | |
super(stage.stageWidth, stage.stageHeight); | |
[Embed(source = "assets/moledig.swf", symbol = "mole_digging_anim")]var c:Class; | |
var mc:MovieClip = new c as MovieClip; | |
var anm:GpuAnimationData = GpuAnimationParser.formatToGpu(AnimationParser.parserByMovieClip(mc, "test")); | |
var num:int = 1000; | |
//改变这行来决定用哪种显示 | |
var layer:GpuObj2d = new GpuSpriteLayer(this, num); | |
//var layer:GpuObj2d = new GpuObj2d; | |
add(layer); | |
while (num-->0) { | |
var sprite:GpuAnimationSprite = new GpuAnimationSprite; | |
sprite.addAnimation(anm); | |
sprite.play("test"); | |
layer.add(sprite); | |
sprite.x = viewWidth * Math.random(); | |
sprite.y = viewHeight * Math.random(); | |
} | |
addChild(new Stats); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment