I'm doing a mario game. I have classes Mario and Enemy. If Mario touches enemy from the top(jumps on it) the enemy should disappear but if the enemy touches Mario from the side, Mario should disappead. How can I detect if Mario is touching Enemy from the side or top?