区别透明度
This commit is contained in:
parent
369bdcf747
commit
64587b8bff
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
@ -190,8 +190,10 @@ class Plant(pg.sprite.Sprite):
|
||||
self.animate_timer = self.current_time
|
||||
|
||||
self.image = self.frames[self.frame_index]
|
||||
if ((self.current_time - self.hit_timer) < 200) or (self.current_time - self.highlightTime < 200):
|
||||
if (self.current_time - self.highlightTime < 200):
|
||||
self.image.set_alpha(150)
|
||||
elif ((self.current_time - self.hit_timer) < 200):
|
||||
self.image.set_alpha(192)
|
||||
else:
|
||||
self.image.set_alpha(255)
|
||||
|
||||
|
||||
@ -182,7 +182,7 @@ class Zombie(pg.sprite.Sprite):
|
||||
if (self.current_time - self.hit_timer) >= 200:
|
||||
self.image.set_alpha(255)
|
||||
else:
|
||||
self.image.set_alpha(150)
|
||||
self.image.set_alpha(192)
|
||||
|
||||
def getTimeRatio(self):
|
||||
return (self.ice_slow_ratio / self.speed) # 目前的机制为:冰冻减速状态与自身速度共同决定行走的时间间隔
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user