add draw
This commit is contained in:
parent
3a1c63f4ce
commit
3e8e04c5fa
7
vpet.py
7
vpet.py
@ -122,7 +122,7 @@ class Activity:
|
||||
|
||||
|
||||
class VPet:
|
||||
def __init__(self, move, pos, draw, x=0, y=0, screen=1):
|
||||
def __init__(self, move, pos, draw, x=0, y=40, screen=1):
|
||||
self.screen = screen
|
||||
self.pos = pos
|
||||
self.x_postion = x
|
||||
@ -140,10 +140,9 @@ class VPet:
|
||||
def action_loop(self):
|
||||
# print(f'Interacting with user: {self.activity.is_interacting_with_user}')
|
||||
if self.activity.is_interacting_with_user: return
|
||||
|
||||
self.move(self.x_postion, self.y_postion)
|
||||
self.draw(self.frames.idle_1)
|
||||
self.move(self.x_postion, self.y_postion + 100)
|
||||
self.x_postion = self.pos().x() + 1
|
||||
self.y_postion = self.pos().y()
|
||||
|
||||
if self.activity.is_sleeping:
|
||||
pass
|
||||
|
||||
@ -14,8 +14,8 @@ class MainWindow(QMainWindow):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.FPS = 60
|
||||
# self.setWindowFlags(Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint)
|
||||
self.setWindowFlags(Qt.WindowStaysOnTopHint)
|
||||
self.setWindowFlags(Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint)
|
||||
# self.setWindowFlags(Qt.WindowStaysOnTopHint)
|
||||
self.setAttribute(Qt.WA_TranslucentBackground)
|
||||
self.click_event_time = 0
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user