Why does my crush act cocky? I think he knows that I like him?

At work he would be like "oh have you realized that we are always working together? you're behind this" or say other subtle things that kind of relate to me liking him
Why does my crush act cocky? I think he knows that I like him?
Post Opinion