Hello everyone ,
I have nearly finished my games im now just rounding up the games with textures and for my character I wanted animated character done in a sprite sheet , however I originally didnt make the character a class and by the looks of you need it to be a class is there anyway i can change the code below to become an animated character using a sprite sheet
local function initPlayer()
-- Create the player object
player = Bitmap.new(Texture.new("images/player.png" , true))
player.x, player.y = 140,240
player.width, player.height = 50, 75
player:setPosition(player.x, player.y)
stage:addChild(player)
end
The reason I dont want to make it into a class is due to the fact a lot of code in my game is based off this and changing it to a class would take a long time to fix , however if its the only way I will do it.
Thanks in advance
Wicked
NOTE: I do have a Sprite.txt and Sprite.png made with Texture packer ready im just wondering how to implement it into the initPlayer Function / Variable
Comments
www.tntengine.com
www.tntengine.com
So thanks for now