Page 1 of 1

making things work

Posted: Fri Jan 01, 2016 4:24 am
by EportV
does everything have to be inside of like a .draw function? like player.draw. if i wanted to make a map completely out of shapes, do i have to name it map.draw? i really dont know. im confused.

sorry if im not making sense.

Re: making things work

Posted: Fri Jan 01, 2016 5:05 am
by pgimeno
The only mandatory function name is the global love.draw, and that's only mandatory if you don't redefine love.run in a way that changes it.

It's customary, but not mandatory, to name the individual functions called by that one 'draw' too. Calling them depends on you, so you can call them however you want.

Some libraries may have certain naming requirements. If you're using a third party library, check that library's details.