Page 2 of 2
Re: Drawing help
Posted: Sun Apr 08, 2012 2:48 pm
by Robin
So... box:draw() is empty. Shouldn't you put the stuff you want to draw in there?
Re: Drawing help
Posted: Sun Apr 08, 2012 3:24 pm
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
Re: Drawing help
Posted: Sun Apr 08, 2012 3:38 pm
by Robin
And is TurretLaser:draw() ever called?
Re: Drawing help
Posted: Sun Apr 08, 2012 3:45 pm
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?
Re: Drawing help
Posted: Sun Apr 08, 2012 4:59 pm
by Robin
This isn't working. I feel like we're communicating on different wavelengths.
Can someone else please help TurtleP?
Re: Drawing help
Posted: Sun Apr 08, 2012 5:08 pm
by kraftman
its "laserimg" not "lazerimg"
solved!
Re: Drawing help
Posted: Sun Apr 08, 2012 7:24 pm
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)