Example #1
0
    public void MoveAatar()
    {
        int nextTileX = Avatar.GetCurrentTileX() + nextMovement.x;
        int nextTileY = Avatar.GetCurrentTileY() + nextMovement.y;

        if (Avatar.IsAtDestination())
        {
            if (Map.TileIsValid(nextTileX, nextTileY))
            {
                Avatar.SetNextTile(new Vector2Int(nextTileX, nextTileY));
            }
        }
    }