diff --git a/game/examples/rpg_stats.rpy b/game/examples/rpg_stats.rpy new file mode 100644 index 0000000..5eeea5e --- /dev/null +++ b/game/examples/rpg_stats.rpy @@ -0,0 +1,40 @@ +label rpg_stats: + + default attack = 0 + default defense = 0 + default magic = 0 + + screen stat(name, amount): + text "[name]: [amount]" + bar value AnimatedValue(amount, 100) xalign 0.5 xsize 300 + + screen stats(): + frame: + xalign 0 ypos 0 + vbox: + use stat("Attack", attack) + null height 15 + use stat("Defense", defense) + null height 15 + use stat("Magic", magic) + + show screen stats + + menu: + "Which stat do you want to increase?" + + "Attack": + $ attack += 1 + jump rpg_stats + + "Defense": + $ defense += 1 + jump rpg_stats + + "Magic": + $ magic += 1 + jump rpg_stats + + "End": + hide screen stats + jump start diff --git a/game/examples/start.rpy b/game/examples/start.rpy index 43c95e4..b71a689 100644 --- a/game/examples/start.rpy +++ b/game/examples/start.rpy @@ -17,6 +17,9 @@ label start: "Drag and Drop": jump drag_and_drop + "RPG Stats": + jump rpg_stats + "Text": jump text