RotationAlly constructor
RotationAlly({
- required Vector2 position,
- required Vector2 size,
- required Future<
SpriteAnimation> animIdle, - required Future<
SpriteAnimation> animRun, - double currentRadAngle = -1.55,
- double speed = 100,
- double life = 100,
- AcceptableAttackOriginEnum receivesAttackFrom = AcceptableAttackOriginEnum.ENEMY,
Implementation
RotationAlly({
required Vector2 position,
required Vector2 size,
required Future<SpriteAnimation> animIdle,
required Future<SpriteAnimation> animRun,
double currentRadAngle = -1.55,
double speed = 100,
double life = 100,
AcceptableAttackOriginEnum receivesAttackFrom =
AcceptableAttackOriginEnum.ENEMY,
}) : super(
position: position,
size: size,
life: life,
speed: speed,
receivesAttackFrom: receivesAttackFrom,
) {
angle = currentRadAngle;
loader?.add(AssetToLoad(animIdle, (value) {
this.animIdle = value;
}));
loader?.add(AssetToLoad(animRun, (value) {
this.animRun = value;
}));
}