DFSprite class Null safety

基础精灵类

Implementers

Constructors

DFSprite({required DFPosition position, required DFSize size})
创建精灵

Properties

angle double
角度
read / write
children List<DFSprite>
子精灵
read / write
fixed bool
固定到屏幕
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
key String?
唯一标识
read / write
parent DFSprite?
相对坐标
read / write
position DFPosition
坐标 左上角是0点
read / write
recyclable bool
是否回收
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
scale double
缩放比例
read / write
size DFSize
尺寸
read / write
visible bool
显示状态
read / write

Methods

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

Operators

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