-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- This introduces a shitton of new problems for which i shall proceed to write issues - New tweens - Fixed epic math fail in screen_center
- Loading branch information
Showing
8 changed files
with
181 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ class CONTROL(IntEnum): | |
DOWN = 1 | ||
UP = 2 | ||
RIGHT = 3 | ||
ENTER = 4 | ||
|
||
|
||
@dataclass | ||
|
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
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,38 @@ | ||
|
||
import typing as t | ||
|
||
from pyglet.image import ImageData | ||
|
||
from pyday_night_funkin.config import CONTROL | ||
from pyday_night_funkin import constants as CNST | ||
from pyday_night_funkin.graphics.pnf_sprite import PNFSprite | ||
from pyday_night_funkin.scenes._base import BaseScene | ||
from pyday_night_funkin.tweens import TWEEN_ATTR, in_out_quart | ||
|
||
|
||
class PauseScene(BaseScene): | ||
""" | ||
Cheap menu scene that destroys itself when button is pressed. | ||
""" | ||
|
||
def __init__(self, game) -> None: | ||
super().__init__(game) | ||
|
||
pixel = ImageData(1, 1, "RGBA", b"\x00\x00\x00\xFF").get_texture() | ||
self.background = self.create_sprite( | ||
"main", image = pixel, | ||
) | ||
self.background.scale_x = CNST.GAME_WIDTH | ||
self.background.scale_y = CNST.GAME_HEIGHT | ||
self.background.opacity = 0 | ||
self.background.start_tween(in_out_quart, {TWEEN_ATTR.OPACITY: 153}, 0.4) | ||
|
||
@staticmethod | ||
def get_layer_names() -> t.Sequence[t.Union[str, t.Tuple[str, bool]]]: | ||
return ("main", ) | ||
|
||
def update(self, dt: float) -> None: | ||
super().update(dt) | ||
|
||
if self.game.key_handler.just_pressed(CONTROL.ENTER): | ||
self.destroy() |
Oops, something went wrong.