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 »

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 »

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 »

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 »

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 »

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 »

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 »

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: Google [Bot] and 35 guests