Browse Source

Project has been abandoned;

I don`t see any sense in this game, but it was a great practice
master
Unbewohnte 4 years ago
parent
commit
745d321777
  1. 6
      Main.py
  2. 9
      surfaces.py

6
Main.py

@ -28,8 +28,8 @@ def play():
print(enemies_on_screen)
player = Player()
death_timer = 1.5
death_timer_calculation = (death_timer/70)/death_timer
death_timer = 1.5 #in seconds
death_timer_calculation = (death_timer/FPS)/death_timer
SCORE = 0
########################## LAYER 0
while True:
@ -69,7 +69,7 @@ def play():
print('<Randoumu no pawa~ !>')
randsurf.switch = False
else:
randsurf.activate(player)
randsurf.activate(window,player)

9
surfaces.py

@ -1,5 +1,5 @@
import pygame
from settings import timesurf_image, randsurf_image, gamefont
from settings import timesurf_image, randsurf_image, gamefont, windowX
pygame.font.init()
surf_font = pygame.font.Font(gamefont, 46)
@ -13,7 +13,8 @@ class BuffRandomSurf:
self.color = (30,70,40)
self.switch = True
self.activation_timer = 1500
self.rect = pygame.Rect(self.x,self.y,self.width,self.height,)
self.rect = pygame.Rect(self.x,self.y,self.width,self.height)
#self.timer_rect = pygame.Rect(100,730,self.activation_timer/6,6)
def place(self,window):
window.blit(randsurf_image,(self.rect[0],self.rect[1]))
@ -24,10 +25,12 @@ class BuffRandomSurf:
else:
return False
def activate(self,player):
def activate(self,window,player):
self.timer_rect = pygame.Rect(windowX//2.5,730,self.activation_timer/4,6)
if self.activation_timer > 0:
self.activation_timer -= 1
player.power_of_random = 3
pygame.draw.rect(window,(255/(self.activation_timer+1),16*(self.activation_timer//100),10),self.timer_rect)
else:
player.power_of_random = 1
#print(power_of_random : ',player.power_of_random)

Loading…
Cancel
Save