I think you are having an emotional affair. I have had that kind of feeling before and fantasize having sex, etc. I think it is OK to stay at the imaginary level.
Your comment seems to be saying that he likes you, but I personally think he does that to everyone. If I were an instructor, I would want my class to be popular. I would do the same thing to people who come to my class.
Also, I wouldn’t recommend you mock other people in the class. Perhaps they think the same think about you.