Added new classes
Edited player.get_damage() function
This commit is contained in:
8
test.py
8
test.py
@@ -2,6 +2,7 @@ import pygame
|
||||
import game
|
||||
import logger
|
||||
import weapons
|
||||
import interface
|
||||
import GameObject
|
||||
import Utils
|
||||
import time
|
||||
@@ -49,6 +50,8 @@ log.writeln(F"Git-Hash: {short_hash}")
|
||||
player1 = GameObject.Player("Player", screen,(screen.get_size()[0]/2)-17, screen.get_size()[1]-100, 35, 35, testimage)
|
||||
player2 = GameObject.Player2("Player2", screen,(screen.get_size()[0]/2)-17, screen.get_size()[1]-100, 35, 35, testimage)
|
||||
|
||||
healthbar1 = interface.Healthbar(screen, "Player1", 25, screen.get_size()[1]-80, 300, 10, player1.get_health())
|
||||
|
||||
game.loadlevels()
|
||||
|
||||
spawned_enemys = list()
|
||||
@@ -127,7 +130,8 @@ while(gamestate):
|
||||
#print("Treffer")
|
||||
#pos_x = mouse_pos[0]
|
||||
#pos_y = mouse_pos[1]
|
||||
|
||||
healthbar1.update(player1.get_health())
|
||||
healthbar1.render(screen)
|
||||
player1.firecontrol(screen)
|
||||
player2.firecontrol(screen)
|
||||
|
||||
@@ -235,5 +239,5 @@ while(gamestate):
|
||||
|
||||
#if(mouse_pos <= (image.topleft+image.size) and mouse_pos >= image.topleft):
|
||||
# print("HIIIIITTT!!!!")
|
||||
clock.tick(90)
|
||||
clock.tick(60)
|
||||
pygame.display.flip()
|
||||
Reference in New Issue
Block a user