5,389
edits
Line 31: | Line 31: | ||
This is an inline call to the <tt>pre</tt> function we have just set up in the global folder. The function <tt>pre</tt> is "globally recognized". | This is an inline call to the <tt>pre</tt> function we have just set up in the global folder. The function <tt>pre</tt> is "globally recognized". | ||
===Why call it <tt>pre</tt>?=== | ===Why call it <tt>pre</tt>?=== | ||
Because everything in <tt>func main</tt> is level-specific settings and/or logic, so if you want something to happen exactly the same every time you load a level, the only place to add that something is at the very start of <tt>func main</tt>, that is, ''before'' all the level-specific content. Which is why it's called "pre". | Because everything in <tt>func main</tt> is level-specific settings and/or logic, so if you want something to happen exactly the same way every time you load a level, the only place to add that something is at the very start of <tt>func main</tt>, that is, ''before'' all the level-specific content. Which is why it's called "pre". | ||
===Why make it inline? (WARNING : EXPERT STUFF)=== | ===Why make it inline? (WARNING : EXPERT STUFF)=== |