I am creating a typical strategic game that gamer can select, deploy and move the game characters (Human mostly) and move or create buildings on its isometric map.
These all are going to be done by gamers gestures obviously, So each time I am handling a tap, pan, swipe or pinch, it is important to know what was the gamer at the middle of or was doing so the new gesture can be handled.
Doing this, I created a global enumerated type including Idle,Select,PanMap and Place and defined a variable with name gameMode to control what the gamer is about to do. for example when the game starts it is valued "Idle" and when gamer touches a building or a character it will be selected only if the gameMode is Idle and if so gameMode will be changed to Select so the handlePan() method can manage the new gesture and sees if the user is moving the map or a selected building for instant.
When the gamer selects a building and does a pan afterward, the game logic should update the gameMode. When the first touch point of the pan gesture is recieved by handlePan() function, the function will check it against the selected building(currentSelection) to see if the gamer is tended to move the building or it is just a simple map panning, by changing the gameMode to "Place" or "PanMap" and check which gameMode is the case while processing the rest of the touches so they can be handled correctly.
As I have mentioned above, I have four game modes including idle, select, panmap(while something is selected), place (when gamer is moving something on the map)
Can anyone with strategic experience tell me is this kind of handling user interaction is the best way?
if yes do you think these modes are enough?
Can you tell me what was your modes in case you used this method?
I am using SpriteKit with xcode.