How to loop lines of code from beginning of game? #639
Replies: 2 comments
-
This post has been migrated automatically from the old LITIENGINE forum (2018 - 2022). |
Beta Was this translation helpful? Give feedback.
-
This post has been migrated automatically from the old LITIENGINE forum (2018 - 2022). |
Beta Was this translation helpful? Give feedback.
-
This post has been migrated automatically from the old LITIENGINE forum (2018 - 2022).
Posted: 2019-01-05 17:29:05
User: CalvinMT [] (age: 1451 days 🔥; posts: 114)
Hi!
I've got these two lines of code and I need them to loop through the entire game.
I tried to cheat and put them in the "render()" of my "InGameScreen" (extends "Screen"), but because "prepare()" seems not to be loaded before "render()", that didn't work.
I definitely don't know where to put them because everything in the game needs to be initialized before looping these two lines in the background.
Is there a function to do this, like by using "Game.loop()"?
Obviously, "IUpdatable" didn't help in the "InGameScreen" class.
Beta Was this translation helpful? Give feedback.
All reactions