Why would a guy randomly start ignoring you/being rude?!

I apologize in advance for the novel I'm about to write (:

I work with this boy (he's only 17, I'm 19) and we have that playful, flirty we-tease-eachother kind of thing going on (stupid, I know), but lately he has completely stopped all of that and switched over to this arrogant-like jerk. I'm not attracted to him per-say, but I have developed a small crush on him over time. So I'm confused as to why he would stop saying hi and talking to me like usual and start giving me attitude and the cold shoulder.

I would just get over it and move on with my life, but I work with him almost every day so it's hard to do when there's this big elephant in the room.