Original Post
Hello
, I just jumped into the waters of game developing and I'm making my first 2d game.
So far I've got the window and basic render loop where I'm animating sprite, which is some walking character. Now I want to make the character walking after arrow keyboard buttons input is made...
I have class Character and I thought that it could be storing the current state like "moving to left", "moving to right", etc.
I'm using raw input but I don't know how to set the states of character based on keyboard input, since WndProc doesn't know about instance of object character...
So what's the common way of doing this?
So far I've got the window and basic render loop where I'm animating sprite, which is some walking character. Now I want to make the character walking after arrow keyboard buttons input is made...
I have class Character and I thought that it could be storing the current state like "moving to left", "moving to right", etc.
I'm using raw input but I don't know how to set the states of character based on keyboard input, since WndProc doesn't know about instance of object character...
So what's the common way of doing this?