making things work

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
EportV
Prole
Posts: 3
Joined: Fri Jan 01, 2016 1:07 am

making things work

Post 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.
User avatar
pgimeno
Party member
Posts: 3640
Joined: Sun Oct 18, 2015 2:58 pm

Re: making things work

Post 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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 11 guests