using minor logic in love.draw
Posted: Tue Mar 10, 2015 8:10 pm
I know that it's frowned upon to do any math/logic in the love.draw loop, but I was wondering how far that convention goes. For example, I have the following code in my draw loop:
Is the multiplication/division of variables to get my scales acceptable, or should I calculate those in update and then use them later in draw?
Code: Select all
if player.slice_anim > 0 then
love.graphics.draw(spr_slice,player.slice_x,player.slice_y,player.slice_direction,
6-(player.slice_anim/player.slice_anim_max)*3,((player.slice_anim/player.slice_anim_max)*3),0,spr_slice:getHeight()/2)
end