2020-09-20 10:51:02 -04:00
|
|
|
from kivy.app import App
|
2020-09-21 17:13:51 -04:00
|
|
|
from kivy.clock import Clock
|
2020-09-20 10:51:02 -04:00
|
|
|
from kivy.uix.label import Label
|
2020-09-21 17:13:51 -04:00
|
|
|
from kivy.uix.widget import Widget
|
|
|
|
from kivy.graphics import Rectangle
|
2020-09-20 10:51:02 -04:00
|
|
|
|
2020-09-21 17:13:51 -04:00
|
|
|
class GameWidget(Widget):
|
|
|
|
def __init__(self,**kwargs):
|
|
|
|
super().__init__(**kwargs)
|
|
|
|
|
|
|
|
with self.canvas:
|
|
|
|
Rectangle(source="images/player.png", pos=(0,0), size=(100,100))
|
|
|
|
|
2020-09-20 10:51:02 -04:00
|
|
|
|
|
|
|
class GlobalForest(App):
|
|
|
|
def build(self):
|
2020-09-21 17:13:51 -04:00
|
|
|
#return Label(text='Hello world')
|
|
|
|
return GameWidget()
|
2020-09-20 10:51:02 -04:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2020-09-21 17:13:51 -04:00
|
|
|
app = GlobalForest()
|
|
|
|
app.run()
|