Bullets shooted doesn't appear

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
User avatar
Pombo
Prole
Posts: 5
Joined: Sun Jul 17, 2022 1:16 am

Bullets shooted doesn't appear

Post by Pombo »

I made a game to test what I learned, with a blue tank that is the player, it has a cannon and shoots when you press "1", and a red tank that follows you. The problem is that the bullet that the player shoots does not appear. I checked the entire code and didn't find what was wrong.
I'll leave here the .zip file with the entire game. The code that makes the bullet work is only in the files main.lua, player.lua, bullet.lua and canhao.lua. I put comments by the codes explaining some functions.
Attachments
lovegame.zip
(10.29 KiB) Downloaded 123 times
User avatar
CogentInvalid
Prole
Posts: 27
Joined: Sat Dec 14, 2013 12:15 am

Re: Bullets shooted doesn't appear

Post by CogentInvalid »

In Bullet:draw() you're calling love.graphics.newImage. Instead you should call love.graphics.draw.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 6 guests