Did I do the right thing or am I being weird?

A co worker was interested in me. He asked for my number. We talked (mostly only at work and text) and got to know each other for a little while. We would sit together on our lunch breaks, share lunch, greet each other with a hug etc but he now has a girlfriend. She doesn’t work there. So it wasn’t messy or anything but I just slowly stopped talking to him and giving hugs and things altogether Because after that it’s like what else is it to talk about? If he pursued me in an intimate way and not a friendly way. What would be the point of continuing communication once he’s no longer single? The conversation is gonna almost always never just be 100%. casual so I figured just say nothing like I use to do before he approached me. Respectfully. I think he’s taking it as me purposely avoiding him because he made a comment to me about avoiding doing certain work task when he’s in proximity to me because we don’t talk anymore. He said it jokingly. It was a joke but something tells me he means it but honestly I just hate to not allow things to be reality. I take things for what they are. Why would I keep on conversations and hugs when he has a woman now?

Did I do the right thing or am I being weird?
Post Opinion