A pickup is a GameObject that has a box collider attached to it. When the box collider is touched by Rigidbody
, we will run code to check what touched it. If what touched it is the player character, we will give the player character a point of what type of pickup it is and then destroy the pickup so that it cannot be touched again. Also, if the pickup is a coin, we will tell the player character that it collected a coin by taking the value of coins the player currently has and add one to it.