love.graphics() is confusing :/
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 1
- Joined: Sat Apr 02, 2016 10:29 pm
love.graphics() is confusing :/
I can't quit understand how the love.graphics works. What I mean is, for example, in love.graphics.setColor() you don't define which object you want the color to change. Same goes for most of other love.graphics commands. How do you know which object's color is going to change?
- slime
- Solid Snayke
- Posts: 3162
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: love.graphics() is confusing :/
The set* functions generally affect everything that's drawn after they're called. So to change the color of something, call love.graphics.setColor and then draw the thing directly after.
Re: love.graphics() is confusing :/
it should be noted that while usually you mean the object directly after, the setting persists indefinetely and until it is overriden by another .setColor() or restored by a .push("all")/.pop().slime wrote:The set* functions generally affect everything that's drawn after they're called. So to change the color of something, call love.graphics.setColor and then draw the thing directly after.
Who is online
Users browsing this forum: Ahrefs [Bot] and 4 guests