Browse Source

定数クラス追加

othello
みてるぞ 7 months ago
parent
commit
e705e059e2
2 changed files with 10 additions and 2 deletions
  1. +7
    -0
      common_const.py
  2. +3
    -2
      main.py

+ 7
- 0
common_const.py View File

@@ -0,0 +1,7 @@
from pydantic import BaseModel


class Window (BaseModel, frozen = True):
WIDTH: int = 1024
HEIGHT: int = 768


+ 3
- 2
main.py View File

@@ -12,6 +12,7 @@ from playsound import playsound
from pygame.locals import *

from aques import Aques
from common_const import *
from common_module import CommonModule
from mode import Mode
from talk import Talk
@@ -35,9 +36,9 @@ class Main:
print (mode)

pygame.init ()
screen: pygame.Surface = pygame.display.set_mode ((1024, 768))
screen: pygame.Surface = pygame.display.set_mode ((Window.WIDTH, Window.HEIGHT))
balloon = pygame.transform.scale (pygame.image.load ('talking.png'),
(1024, 384))
(Window.WIDTH, 384))
if goatoh_mode:
balloon = pygame.transform.flip (balloon, False, True)
pygame.mixer.init (frequency = 44100)


Loading…
Cancel
Save