DFTextSprite class

文本精灵类

Inheritance

Constructors

DFTextSprite(String text, {double fontSize = 14, Color color = const Color(0xFFFFFFFF), Color background = const Color(0x00FFFFFF), DFSize size = const DFSize(80, 20)})
创建文本精灵

Properties

angle double
角度
getter/setter pairinherited
background Color
背景颜色
getter/setter pair
children List<DFSprite>
子精灵
getter/setter pairinherited
color Color
文字大小
getter/setter pair
fixed bool
固定到屏幕
getter/setter pairinherited
fontSize double
文字大小
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
key String?
唯一标识
getter/setter pairinherited
onUpdate ↔ void Function(double dt)?
更新监听函数
getter/setter pair
parent DFSprite?
相对坐标
getter/setter pairinherited
position DFPosition
坐标 左上角是0点
getter/setter pairinherited
recyclable bool
是否回收
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double
缩放比例
getter/setter pairinherited
size DFSize
尺寸
getter/setter pairinherited
text String
文本内容
getter/setter pair
visible bool
显示状态
getter/setter pairinherited

Methods

addChild(DFSprite sprite) → void
增加子精灵
inherited
addChildren(List<DFSprite> sprites) → void
增加精灵 增加进来精灵才能被绘制
inherited
getCollisionShape() DFShape
碰撞形状
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeChild(DFSprite sprite) → void
移除子精灵
inherited
render(Canvas canvas) → void
渲染精灵
override
setOnUpdate(dynamic onUpdate(double dt)) → void
设置更新函数
toString() String
A string representation of this object.
inherited
update(double dt) → void
更新文本
override

Operators

operator ==(Object other) bool
The equality operator.
inherited