He is my teacher, sometimes he glances, winks and stares at me, but now he is avoiding me?

Before when I ask something he replies with smile but now he just gives the and to me. I have changed my batch, my teacher is his close friend and he is also talking me rudely, after changing my batch he is rude to me is this the reason ?