Log In  

I have figured out a very effective and token-saving method of creating scenes.

First, create a scene array called scnr(scene-running) and a variable called scn(for scene id). start it at 1

scnr={}
scn=1

inside of that array we create functions with comments to tell which is what

--[[_init]]--
scnr={
 --scene splash
 function() 
  --some stuff here
 end,

 --scene title
 function()
  --some title stuff here
 end
}

then inside _draw() we simply do:

--[[_draw]]--
scnr[scn]()

Let me know if you guys know of another method thats more efficient.

P#62940 2019-03-21 21:18


[Please log in to post a comment]

About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-08-21 21:17 | 0.010s | 2097k | Q:13