finale update
When I started the project backup I started by adding an attack radius to the base tower. I also set it up to toggle show the radius which will be use to open the menu to upgrade,
I've added on the code for the enemy
class enemy(QGraphicsRectItem,QTimer):
def __init__(self,parent=None):
super(enemy, self).__init__(parent)
self.setRect(0,75,75,75)
self.check = 0
def move(self):
while self.x()<400:
self.setPos(self.x() + 100, self.y())
self.check = 1
temp = enemy()
temp.singleShot(1000,temp,temp.move)
scene.addItem(temp)
I found out why my code just stopped working the file somehow corrupted, but the code inside was fine so I grabbed a older version of the same code I had emailed to my self and copy and pasted the new stuff into it.
Comments
Post a Comment