Why would a guy get quiet with his friends when you walk by?

Backstory time! I like this guy, and he found out. Things became werid in the sense that he got shy, would turn pink feel the need to dip all the time. I felt depressed at that time. Then i made it seemed as though i didn't care and made the effort to talk to him and act like everything is normal. And he was kinda normal with me. Then he told me was switiching departments and we kinda ended up working together till his last two days. He became awk again on his last day but i didn't think much of it. Now when i see him in the break room when he's talking to his close friend he'd suddently shut up when i walk past him to get my stuff in my locker or even sit with my firends. The other day i was going up the escaltors and him and his friend were going down, and he stoped talking as soon as he saw me. I couldnt control my smile so i had to look the other way, but from the corner of my eye i kinda saw him turn reddish with a weird smile. His friend asked me where i was going ( by this point I had passed them so i turned around) and i told him. But the way this guy acts bothers me. What am I supposed to think about this? What do you think about this?
Why would a guy get quiet with his friends when you walk by?
Post Opinion