You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -17,49 +17,49 @@ This is a simple example of how the ScreenManager should be used (note: You will
17
17
```lua
18
18
-- main.lua
19
19
20
-
localScreenManager=require('lib.ScreenManager');
20
+
localScreenManager=require('lib.ScreenManager')
21
21
22
22
functionlove.load()
23
23
localscreens= {
24
-
main=require('src.screens.MainScreen');
25
-
};
24
+
main=require('src.screens.MainScreen')
25
+
}
26
26
27
-
ScreenManager.init(screens, 'main');
27
+
ScreenManager.init(screens, 'main')
28
28
end
29
29
30
30
functionlove.draw()
31
-
ScreenManager.draw();
31
+
ScreenManager.draw()
32
32
end
33
33
34
34
functionlove.update(dt)
35
-
ScreenManager.update(dt);
35
+
ScreenManager.update(dt)
36
36
end
37
37
```
38
38
Note how MainScreen inherits from Screen.lua. This isn't mandatory, but recommended since Screen.lua already has templates for most of the callback functions.
0 commit comments