Hello, I am very new to LOVE. I have a game that i am working on and I need someone to help me change cube character in the game to the character in "sprites/player_right.png"
That blue cube in the middle needs to be replaced with my character.
Basically, I want that cube replaced with my character that i have in the "sprites folder", I have included a .zip and .love of my project to this thread. If you need any more info, just ask. And please don't be mean, this is my first post. Thanks in advance.
Sorry about that project link problem. I have updated it so you can have a look at it. Thanks for the reply. And by the way, I am still unsure of how i would use love.graphics.draw in my code. I mean, I know what it does and how to use it but it is not compatible with my code. Anyways you will see when you have a look at my main.lua. Thanks again.
It will work the way Norubal explained. In the love.draw function there currently is a love.graphics.rectangle. You need to replace this by a love.graphics.draw. (Edit: I got Plu'd)
I highly suggest reading the tutorial in the wiki to understand how that works. See here. You should start with the hamster ball tutorial.
function player:draw()
if self.isFacing == "left" then
love.graphics.draw( player_image_left, player.x - player.w/2, player.y - player.h)
end
if self.isFacing == "right" then
love.graphics.draw( player_image_right, player.x - player.w/2, player.y - player.h)
end
end