MartinK12
Member
Many times I have to change variables and sprites according to some other variable.
In example:
Should I split this into step and draw event like below so check clicked both in step and draw event?
In step event:
In draw event:
Or should I put all that code in the draw event? Or any other solution? The same goes with switch statement which are much bigger. What is the best practice?
Thank You for your answer.
In example:
Code:
if clicked {
var1 = 1;
var2 = 2;
draw_sprite...
image_index...
image_speed..
}
Should I split this into step and draw event like below so check clicked both in step and draw event?
In step event:
Code:
if clicked {
var1 = 1;
var2 = 2;
}
Code:
if clicked {
draw_sprite...
image_index...
image_speed..
}
Thank You for your answer.