refactor: comments and sizing

pull/204/head
Allison Ryan 3 years ago
parent 354641b414
commit 1be30ebd25

@ -78,14 +78,13 @@ class AlienBumper extends BodyComponent with InitialPosition {
}
}
@visibleForTesting
/// Indicates the [AlienBumper]'s current sprite state.
@visibleForTesting
enum AlienBumperSpriteState {
/// The active sprite is being displayed.
/// A lit up bumper.
active,
/// The inactive sprite is being displayed.
/// A dimmed bumper.
inactive,
}
@ -115,8 +114,8 @@ class _AlienBumperSpriteGroupComponent
Sprite(gameRef.images.fromCache(_offAssetPath)),
};
this.sprites = sprites;
size = sprites.entries.first.value.originalSize / 10;
current = AlienBumperSpriteState.active;
size = sprites[current]!.originalSize / 10;
}
}

@ -93,14 +93,13 @@ class DashNestBumper extends BodyComponent with InitialPosition {
}
}
@visibleForTesting
/// Indicates the [DashNestBumper]'s current sprite state.
@visibleForTesting
enum DashNestBumperSpriteState {
/// The active sprite is being displayed.
/// A lit up bumper.
active,
/// The inactive sprite is being displayed.
/// A dimmed bumper.
inactive,
}
@ -130,8 +129,8 @@ class _DashNestBumperSpriteGroupComponent
Sprite(gameRef.images.fromCache(_inactiveAssetPath)),
};
this.sprites = sprites;
size = sprites[DashNestBumperSpriteState.inactive]!.originalSize / 10;
current = DashNestBumperSpriteState.inactive;
size = sprites[current]!.originalSize / 10;
}
}

@ -93,14 +93,13 @@ class SparkyBumper extends BodyComponent with InitialPosition {
}
}
@visibleForTesting
/// Indicates the [SparkyBumper]'s current sprite state.
@visibleForTesting
enum SparkyBumperSpriteState {
/// The active sprite is being displayed.
/// A lit up bumper.
active,
/// The inactive sprite is being displayed.
/// A dimmed bumper.
inactive,
}
@ -130,8 +129,8 @@ class _SparkyBumperSpriteGroupComponent
Sprite(gameRef.images.fromCache(_offAssetPath)),
};
this.sprites = sprites;
size = sprites.entries.first.value.originalSize / 10;
current = SparkyBumperSpriteState.active;
size = sprites[current]!.originalSize / 10;
}
}

Loading…
Cancel
Save