Drawing help

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.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Drawing help

Post by Robin » Sun Apr 08, 2012 2:48 pm

So... box:draw() is empty. Shouldn't you put the stuff you want to draw in there?
Help us help you: attach a .love.

User avatar
TurtleP
Party member
Posts: 147
Joined: Thu Mar 22, 2012 9:20 pm
Contact:

Re: Drawing help

Post by TurtleP » Sun Apr 08, 2012 3:24 pm

Robin wrote:So... box:draw() is empty. Shouldn't you put the stuff you want to draw in there?
Well I did, but it's now going to be in TurretLaser:draw() It makes sense I believe. Because the laser is seperate from the turret, but belongs with it. Much like how Maurice did the bulletbill.lua

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Drawing help

Post by Robin » Sun Apr 08, 2012 3:38 pm

And is TurretLaser:draw() ever called?
Help us help you: attach a .love.

User avatar
TurtleP
Party member
Posts: 147
Joined: Thu Mar 22, 2012 9:20 pm
Contact:

Re: Drawing help

Post by TurtleP » Sun Apr 08, 2012 3:45 pm

This might sound stupid.. but how?

I'm not sure how to call it. I though of doing what was in game.lua, the

for j, w in pairs do
w: draw()
end

But would that work for the TurretLaser?

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Drawing help

Post by Robin » Sun Apr 08, 2012 4:59 pm

This isn't working. I feel like we're communicating on different wavelengths.

Can someone else please help TurtleP?
Help us help you: attach a .love.

User avatar
kraftman
Party member
Posts: 277
Joined: Sat May 14, 2011 10:18 am

Re: Drawing help

Post by kraftman » Sun Apr 08, 2012 5:08 pm

its "laserimg" not "lazerimg"

solved!

User avatar
TurtleP
Party member
Posts: 147
Joined: Thu Mar 22, 2012 9:20 pm
Contact:

Re: Drawing help

Post by TurtleP » Sun Apr 08, 2012 7:24 pm

kraftman wrote:its "laserimg" not "lazerimg"

solved!
I know its laserimg. *facepalm*

I need to call TurretLaser:draw() somehow don't I? Then I can draw the laser for the turret. That's the point. Box:draw() could work, but also, how could I increase the x value of the laser? (Probably in box:updaterange() or something)

Post Reply

Who is online

Users browsing this forum: 4vZEROv, Google [Bot] and 54 guests