public void updateCombatPosition(Vector3 position) { Hex newHex = MyBoard.findHexAt(position); if (newHex != null) { Hex currentHex = getCurrentHex(); if (currentHex != newHex) { GameEntity gameEntity = newHex.MyGameEntity; if (gameEntity != null) { // some other player is occupying this spot. This isn't supposed to happen // Only one player or obstacle on a hex. return; } currentHex.MyGameEntity = null; newHex.MyGameEntity = this; combatLocation.i = newHex.I; combatLocation.j = newHex.J; } combatLocation.position = position; combatLocation.direction = getDirection(movePath); sprite.updateLocation(combatLocation); } }