text
来源:互联网 发布:java里 try 编辑:程序博客网 时间:2024/06/09 20:14
TextExample:Text textCenter = newText(100, 60, this.mFont,"Hello AndEngine!\nYou can even have multilined text!", HorizontalAlign.CENTER);这句就生成一个Text对象在屏幕上显示文字,是居中对齐。当然生成后得scene.attachChild(textCenter);才有用。注意Load的时候,Font的生成方法:
this.mFontTexture= newBitmapTextureAtlas(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
TickerTextExample:逐字动画显示。newTickerText最后的参数就是显示的速度。对TextregisterEntityModifier注册一个并行的Modifier使其边缩放边改变透明度(ScaleModifier,AlphaModifier)。setBlendFunction设置Blend方式。
ChangeableText:前两者都是内容固定的Text。可变的用newChangeableText就可以了。本例另一个有价值的部分是帧率的取得:1.FPSCounter作为UpdateHandler注册到引擎里。2.在Scene里注册个TimerHandler,onTimePassed事件里改变ChangeableText的内容。论坛上解释在Scene里和GameEngine里注册UpdateHandler是一个效果。
CustomFontExample:自定义字体。FontFactory.setAssetBasePath,,FontFactory.createFromAsset,this.getFontManager().loadFonts像生成图片asset那样生成字体。New Text的时候设置字体。
StrokeFontExample:字体描边。Font:普通字体类。StrokeFont:描边字体类。各种参数参考代码吧。
- text
- text
- text
- text
- Text
- text
- text
- text
- text
- TEXT
- text
- text
- text
- text
- .text()
- text
- text
- Text
- redis平滑升级redis-2.4到redis-2.6
- 数据库异常 为过程函数GSP_GP_EfficacyAccounts指定过多参数
- 黑马程序员---DataSet用法详细
- 关于 Java 中 finally 语句块的深度辨析
- 简单的xml常用函数
- text
- error: failed to attach to process ID xxx
- java 常用设计模式
- hdu 1412 搬寝室 (很好的一道dp题)
- 数据库异常 为过程函数GSP_GP_EfficacyUserID
- 【念7.31】新项目
- jolfe的安卓之旅_05题外话之执行力
- SQL SERVER 2008 R2 无法连接
- linux 下 常见 知识点