Browse Source

冗長な記述を削除

sicawke
みてるぞ 6 months ago
parent
commit
0b8e9812b9
1 changed files with 3 additions and 8 deletions
  1. +3
    -8
      main.py

+ 3
- 8
main.py View File

@@ -388,9 +388,8 @@ class Main:

screen.blit (bg_grass, (0, 0))

@classmethod
@staticmethod
def get_jojoko (
cls,
jojoko_original: pygame.Surface,
moon_days_old: float) \
-> pygame.Surface:
@@ -399,14 +398,10 @@ class Main:
jojoko.set_colorkey ((0, 255, 0))

for i in range (200):
if 1 <= moon_days_old < 7:
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))
elif moon_days_old < 14:
pygame.gfxdraw.bezier (jojoko, ((0, 100 + i), (100, 180 * moon_days_old / 7 - 80 + i), (200, 100 + i)), 3, (0, 255, 0))
elif moon_days_old < 15:
elif moon_days_old < 16:
pass
elif moon_days_old < 22:
pygame.gfxdraw.bezier (jojoko, ((0, 100 - i), (100, 180 * (moon_days_old - 15) / 7 - 80 - i), (200, 100 - i)), 3, (0, 255, 0))
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))
else:


Loading…
Cancel
Save