You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

selectlv.lua 573 B

3 jaren geleden
3 jaren geleden
3 jaren geleden
3 jaren geleden
123456789101112131415161718192021222324252627
  1. selectlv = Class{}
  2. levels = {}
  3. table.insert(levels, menu:addButton("Level 1", function ()
  4. gameState = "level1"
  5. end ))
  6. table.insert(levels, menu:addButton("Level 2", function ()
  7. if saveData.levelsBeaten > 0 then
  8. gameState = "level2"
  9. end
  10. end ))
  11. table.insert(levels, menu:addButton("Go Back", function ()
  12. gameState = "menu"
  13. end ))
  14. local M = {}
  15. function selectlv.update(dt)
  16. end
  17. function selectlv.draw(dt)
  18. menu:butt(levels, WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_WIDTH/2, WINDOW_HEIGHT/2, 40, WINDOW_WIDTH/3, "beatenGreen")
  19. end
  20. return selectlv