void UpdateMovement() { playerPos = pawn_sprite.transform.position; playerCellPos = gameGrid.GetWorldFlToCellPos(playerPos); if (prevCellPos != playerCellPos) { tileRefManager.SetTile(TileRefManager.TILEMAP_TYPE.TILEMAP_PLAYER, prevCellPos, null); prevCellPos = playerCellPos; } if (tileRefManager.GetTileAtCellPos(TileRefManager.TILEMAP_TYPE.TILEMAP_PLAYER, playerCellPos) != tileRefManager.GetTileRef(TileRefManager.TILE_TYPE.TILE_WARNING)) { tileRefManager.SetTile(TileRefManager.TILEMAP_TYPE.TILEMAP_PLAYER, playerCellPos, tileRefManager.GetTileRef(TileRefManager.TILE_TYPE.TILE_WARNING)); } if (MyNetwork.instance.IsOnlineGame()) { if (!isServer) { CmdUpdateMoveDir(dpad.GetMoveDir()); } else { dpad_moveDir = dpad.GetMoveDir(); } } Move(dpad.GetMoveDir()); RenderAnim(); //if (targetTilePos != Vector2.zero) //{ // if (playerPos != targetTilePos) // { // pawn_sprite.transform.position = Vector2.MoveTowards(playerPos, targetTilePos, Time.deltaTime); // } // else // { // if (!b_reachedTarget) // { // gameGrid.SetTile(TileRefManager.TILEMAP_TYPE.TILEMAP_PLAYER, gameGrid.GetWorldFlToCellPos(playerPos), originalTile); // b_shownCrossTiles = false; // b_reachedTarget = true; // } // } //} }