Эх сурвалжийг харах

videogame update() modified to draw visible_inventory

Zero! Studio 1 жил өмнө
parent
commit
65a366b8b5

+ 2 - 0
jogai/videogame.py

@@ -456,6 +456,8 @@ def update():
     if _globals.vg_texts:
         for texts_item in _globals.vg_texts:
             paint(texts_item)
+    if _globals.visible_inventory:
+        _globals.visible_inventory.draw()
     if _globals.marks:
         _globals.marks.draw()
     pygame.display.flip()

+ 6 - 1
scripts/basics.py

@@ -6,6 +6,11 @@ def test_example01():
     prepare('02.yaml')
     sq = StairsGroup(brick, 5)
     add_group(sq)
-    set_marks(50)
+
+    inv = Inventory()
+    inv.add(brick)
+    inv.add(secondary)
+    inv.show()
+
     while is_running():
         update()