Enemy constructor
Enemy({
- required Vector2 position,
- required Vector2 size,
- double life = 10,
- double? speed,
- AcceptableAttackOriginEnum receivesAttackFrom = AcceptableAttackOriginEnum.PLAYER_AND_ALLY,
Implementation
Enemy({
required Vector2 position,
required Vector2 size,
double life = 10,
double? speed,
AcceptableAttackOriginEnum receivesAttackFrom =
AcceptableAttackOriginEnum.PLAYER_AND_ALLY,
}) : super(position: position, size: size, speed: speed) {
this.receivesAttackFrom = receivesAttackFrom;
initialLife(life);
}