SimpleAlly constructor
SimpleAlly({
- required Vector2 position,
- required Vector2 size,
- SimpleDirectionAnimation? animation,
- double life = 100,
- double speed = 100,
- Direction initDirection = Direction.right,
- AcceptableAttackOriginEnum receivesAttackFrom = AcceptableAttackOriginEnum.ENEMY,
Implementation
SimpleAlly({
required Vector2 position,
required Vector2 size,
SimpleDirectionAnimation? animation,
double life = 100,
double speed = 100,
Direction initDirection = Direction.right,
AcceptableAttackOriginEnum receivesAttackFrom =
AcceptableAttackOriginEnum.ENEMY,
}) : super(
position: position,
size: size,
life: life,
speed: speed,
receivesAttackFrom: receivesAttackFrom,
) {
this.animation = animation;
lastDirection = initDirection;
lastDirectionHorizontal =
initDirection == Direction.left ? Direction.left : Direction.right;
}