-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d49128
commit 624f62f
Showing
5 changed files
with
60 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import logging | ||
from ecs_pattern import EntityManager | ||
from typing import Tuple | ||
from ....entities import ( | ||
Cache, | ||
WidgetClockDate, | ||
WidgetClockTime, | ||
WidgetSpinner, | ||
WidgetTileGrid, | ||
) | ||
from ..sprites import build_image_sprite | ||
from . import Stage | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class StageSeven(Stage): | ||
image_count: int | ||
|
||
def __init__( | ||
self, | ||
entities: EntityManager, | ||
display_size: Tuple[int, int], | ||
) -> None: | ||
super().__init__(entities) | ||
self.display_size = display_size | ||
self.setup() | ||
|
||
def setup(self) -> None: | ||
self.cache = next(self.entities.get_by_class(Cache)) | ||
|
||
self.stage_entities.append( | ||
WidgetSpinner( | ||
build_image_sprite(self.cache.surfaces["mode7_vinyl"][0]), | ||
x=0, | ||
y=8, | ||
z_order=5, | ||
frames=self.cache.surfaces["mode7_vinyl"], | ||
frame_delay=1, | ||
), # type: ignore[call-arg] | ||
) | ||
|
||
for w in self.entities.get_by_class( | ||
WidgetClockDate, | ||
WidgetClockTime, | ||
WidgetTileGrid, | ||
): | ||
w.fade_target_alpha = 255 |