Creating a player
The player character is a small, green alien-looking creature that can be controlled and guided by the gamer through a level using many conventional platform-game mechanics, such as walking, jumping, and interacting. In the previous section, we built a White Box (prototype) character to test physical interactions with the environment, but here, we'll develop the player character in more depth. Figure 5.27 illustrates our character texture imported earlier in the chapter, representing all limbs and parts for the player:
The player texture, as shown in Figure 5.27, is called an Atlas Texture or Sprite Sheet because it contains all frames or parts of a character in a single texture space. The problem with this texture, as it stands, is that when dragged and dropped from the Project panel to the scene, it'll be added as a single, self-contained sprite. This is because Unity recognizes all the separate parts as a single...