Hello all,
I am trying to be good and not use evil global variables, as I know how horrible this can get.
What I'm having trouble with is that if, I want to create a method to say, just draw a title screen, I have to do this in 2 parts.
On part renders, the other updates. While I understand the logic in this, I don't really see how I can use local variables.
So I have two questions.
1. does my question make sense?
2. Any suggestions?
Method render_board_select:Void()
Local x:Int = 1000
DrawImage(board_img, x, 0)
End Method
Method update_board_select:Void()
If x > 0 Then x=x-10
End Method
Many thanks,
Kurt
I am trying to be good and not use evil global variables, as I know how horrible this can get.
What I'm having trouble with is that if, I want to create a method to say, just draw a title screen, I have to do this in 2 parts.
On part renders, the other updates. While I understand the logic in this, I don't really see how I can use local variables.
So I have two questions.
1. does my question make sense?
2. Any suggestions?
Method render_board_select:Void()
Local x:Int = 1000
DrawImage(board_img, x, 0)
End Method
Method update_board_select:Void()
If x > 0 Then x=x-10
End Method
Many thanks,
Kurt
Last edited: