Created function for player and bullets