|
@@ -96,11 +96,11 @@ class Main: |
|
|
|
|
|
|
|
|
# き太く陽 |
|
|
# き太く陽 |
|
|
kita: pygame.Surface = pygame.transform.scale ( |
|
|
kita: pygame.Surface = pygame.transform.scale ( |
|
|
pygame.image.load ('sun.png'), (200, 200)) |
|
|
|
|
|
|
|
|
pygame.image.load ('sun.png'), (CKita.WIDTH, CKita.HEIGHT)) |
|
|
|
|
|
|
|
|
# 大月ヨヨコ |
|
|
# 大月ヨヨコ |
|
|
jojoko: pygame.Surface = pygame.transform.scale ( |
|
|
jojoko: pygame.Surface = pygame.transform.scale ( |
|
|
pygame.image.load ('moon.png'), (200, 200)) |
|
|
|
|
|
|
|
|
pygame.image.load ('moon.png'), (CJojoko.WIDTH, CJojoko.HEIGHT)) |
|
|
|
|
|
|
|
|
# 音声再生器の初期化 |
|
|
# 音声再生器の初期化 |
|
|
pygame.mixer.init (frequency = 44100) |
|
|
pygame.mixer.init (frequency = 44100) |
|
@@ -270,7 +270,7 @@ class Main: |
|
|
+ '...')), |
|
|
+ '...')), |
|
|
True, |
|
|
True, |
|
|
(192, 0, 0)), |
|
|
(192, 0, 0)), |
|
|
(100, 200 + 384) if goatoh_mode else (100 + (64 if (double_mode and not goatoh_talking) else 0), 200)) |
|
|
|
|
|
|
|
|
(100, 200 + CWindow.HEIGHT / 2) if goatoh_mode else (100 + (64 if (double_mode and not goatoh_talking) else 0), 200)) |
|
|
|
|
|
|
|
|
pygame.display.update () |
|
|
pygame.display.update () |
|
|
|
|
|
|
|
@@ -359,9 +359,10 @@ class Main: |
|
|
jojoko: pygame.Surface = cls.get_jojoko (jojoko_original, |
|
|
jojoko: pygame.Surface = cls.get_jojoko (jojoko_original, |
|
|
moon_days_old, moon_alt, moon_az) |
|
|
moon_days_old, moon_alt, moon_az) |
|
|
|
|
|
|
|
|
|
|
|
# TODO: 大月と重複多いため修正すること |
|
|
x = CWindow.WIDTH * (sun_az - 80) / 120 |
|
|
x = CWindow.WIDTH * (sun_az - 80) / 120 |
|
|
y = ((CWindow.HEIGHT / 2) |
|
|
y = ((CWindow.HEIGHT / 2) |
|
|
- (CWindow.HEIGHT / 2 + 100) * math.sin (math.radians (sun_alt)) / math.sin ( math.radians (60))) |
|
|
|
|
|
|
|
|
- (CWindow.HEIGHT / 2 + CKita.HEIGHT / 2) * math.sin (math.radians (sun_alt)) / math.sin ( math.radians (60))) |
|
|
arg = math.degrees (math.atan2 (y - cls.kita_y, x - cls.kita_x)) |
|
|
arg = math.degrees (math.atan2 (y - cls.kita_y, x - cls.kita_x)) |
|
|
|
|
|
|
|
|
cls.kita_x = x |
|
|
cls.kita_x = x |
|
@@ -416,19 +417,21 @@ class Main: |
|
|
|
|
|
|
|
|
jojoko.set_colorkey ((0, 255, 0)) |
|
|
jojoko.set_colorkey ((0, 255, 0)) |
|
|
|
|
|
|
|
|
for i in range (200): |
|
|
|
|
|
|
|
|
for i in range (int (CJojoko.HEIGHT)): |
|
|
|
|
|
# TODO: 冗長かつ可読性に缺けるため修正すること |
|
|
if 1 <= moon_days_old < 15: |
|
|
if 1 <= moon_days_old < 15: |
|
|
pygame.gfxdraw.bezier (jojoko, ((0, 100 + i), (100, 180 * moon_days_old / 7 - 80 + i), (200, 100 + i)), 3, (0, 255, 0)) |
|
|
|
|
|
|
|
|
pygame.gfxdraw.bezier (jojoko, ((0, CJojoko.HEIGHT / 2 + i), (CJojoko.WIDTH / 2, (CJojoko.HEIGHT * 0.9) * moon_days_old / 7 - CJojoko.HEIGHT * 0.4 + i), (CJojoko.WIDTH, CJojoko.HEIGHT / 2 + i)), 3, (0, 255, 0)) |
|
|
elif moon_days_old < 16: |
|
|
elif moon_days_old < 16: |
|
|
pass |
|
|
pass |
|
|
elif moon_days_old < 30: |
|
|
elif moon_days_old < 30: |
|
|
pygame.gfxdraw.bezier (jojoko, ((0, 100 - i), (100, 180 * (moon_days_old - 15) / 7 - 80 - i), (200, 100 - i)), 3, (0, 255, 0)) |
|
|
|
|
|
|
|
|
pygame.gfxdraw.bezier (jojoko, ((0, CJojoko.HEIGHT / 2 - i), (CJojoko.WIDTH / 2, (CJojoko.HEIGHT * 0.9) * (moon_days_old - 15) / 7 - CJojoko.HEIGHT * 0.4 - i), (CJojoko.WIDTH, CJojoko.HEIGHT / 2 - i)), 3, (0, 255, 0)) |
|
|
else: |
|
|
else: |
|
|
jojoko.fill ((0, 255, 0)) |
|
|
jojoko.fill ((0, 255, 0)) |
|
|
|
|
|
|
|
|
|
|
|
# TODO: き太く陽生成と重複多いため外出しすること |
|
|
x = CWindow.WIDTH * (moon_az - 80) / 120 |
|
|
x = CWindow.WIDTH * (moon_az - 80) / 120 |
|
|
y = ((CWindow.HEIGHT / 2) |
|
|
y = ((CWindow.HEIGHT / 2) |
|
|
- (CWindow.HEIGHT / 2 + 100) * math.sin (math.radians (moon_alt)) / math.sin (math.radians (60))) |
|
|
|
|
|
|
|
|
- (CWindow.HEIGHT / 2 + CJojoko.HEIGHT / 2) * math.sin (math.radians (moon_alt)) / math.sin (math.radians (60))) |
|
|
arg = math.degrees (math.atan2 (y - cls.jojoko_y, x - cls.jojoko_x)) |
|
|
arg = math.degrees (math.atan2 (y - cls.jojoko_y, x - cls.jojoko_x)) |
|
|
|
|
|
|
|
|
cls.jojoko_x = x |
|
|
cls.jojoko_x = x |
|
|