hourglass

This commit is contained in:
Frank DeMarco 2018-07-09 22:59:35 -04:00
parent a5a47d1c41
commit 5802b1f12d
2 changed files with 4 additions and 4 deletions

8
NS.py
View File

@ -883,7 +883,6 @@ class Light(Animation):
get_hsla_color(int(color.hsla[0]), int(color.hsla[1]), int(color.hsla[2]), int(ratio * 100)),
True, shifted, 5)
ds.blit(intermediate, (0, 0))
# aapolygon(ds, shifted, color)
def in_orientation(self, orientation):
if self.position == NS.LNW:
@ -1015,10 +1014,10 @@ class Timer(GameChild):
self.background.location.topright = self.get_display_surface().get_rect().topright
self.bar = load(self.get_resource("HUD_bar.png")).convert_alpha()
self.bar = flip(self.bar, True, False)
self.label = Sprite(self)
self.label.load_from_path(self.get_resource("Timer_label.png"), True)
self.hourglass = Sprite(self)
self.hourglass.load_from_path(self.get_resource("Hourglass.png"), True)
dsr = self.get_display_surface().get_rect()
self.label.location.topright = dsr.right - 2, 5
self.hourglass.location.midright = dsr.right, self.TOP + self.SIZE / 2
def reset(self):
self.time_remaining = self.get_configuration("time", "timer-start-time")
@ -1030,6 +1029,7 @@ class Timer(GameChild):
self.time_remaining -= self.get_game().time_filter.get_last_frame_duration()
def update(self):
self.hourglass.update()
if self.time_remaining > 5500:
hue = 120
elif self.time_remaining > 3000:

BIN
resource/Hourglass.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1002 B