e3roid游戏引擎的使用
e3roid游戏是一款基于了libgdx的box2d部分的一款2d开源游戏引擎。
?
博客地址:http://www.e3roid.com/blog/
?
基本的用法
package com.testnewengine;import android.graphics.Color;import android.graphics.Typeface;import com.e3roid.E3Activity;import com.e3roid.E3Engine;import com.e3roid.E3Scene;import com.e3roid.drawable.Sprite;import com.e3roid.drawable.sprite.TextSprite;import com.e3roid.drawable.texture.AssetTexture;import com.e3roid.util.Debug;import com.e3roid.util.FPSListener;public class TestNewEngine extends E3Activity{TextSprite label;@Overridepublic E3Engine onLoadEngine() {E3Engine engine = new E3Engine(this, 480, 800);return engine;}@Overridepublic void onLoadResources() {label = new TextSprite("hello,e3roid!", 100, Color.BLACK, 0, Typeface.DEFAULT, this);label.setPosition(100, 100);}@Overridepublic E3Scene onLoadScene() {E3Scene scene = new E3Scene();scene.addEventListener(this);scene.getTopLayer().add(label);return scene;}}?