hi kikito,
Thanks for the reply and yes, i am still new bird who in love
i jz figure out this yday night
* love.draw is a function that gets called once per frame
i jz know this after reading this post
* Before calling it, L?VE erases the screen completely
regarding the function below
Code: Select all
function love.draw()
if condition_for_drawing_arrow then
love.graphics.draw(arrow, 100, 200, math.rad(arrow_rotate_angle), 1, 1, 75, 200)
love.graphics.draw(arrow, 200, 200, math.rad(arrow_rotate_angle), 1, 1, 75, 200)
love.graphics.draw(arrow, 300, 200, math.rad(arrow_rotate_angle), 1, 1, 75, 200)
end
end
i notice this is the way to draw/remove after i know the role below (and reason i open this thread is to ask for any friendly alternative solution)
* love.draw is a function that gets called once per frame
i actually come from other game programming background,
Question for the creator of love (no offence)
since we are using command below to create an object on screen
Code: Select all
love.graphics.draw(arrow, 100, 200, math.rad(arrow_rotate_angle), 1, 1, 75, 200)
isn't that better to store the object to a variable (as an object), so that later can use object.scaleX, object.getPostX, object.RemoveMe
fish = love.graphics.draw(fish_sprite, 100, 200, math.rad(arrow_rotate_angle), 1, 1, 75, 200)
fish_food = love.graphics.draw(food_sprite, 100, 200, math.rad(arrow_rotate_angle), 1, 1, 75, 200)
then when fish fish collide with fish_food
we jz write fish_food.RemoveMe
instead of saying, "if fishfood_not_yet_eaten" logic
i mean, if my idea doesn't work in love, i will follow kikito's approach