Adding Projectiles to a Player
摘要
Creating a projectile and making it move is the first step. The second step is making that projectile appear when and where you want it during a game. In most cases, you want a projectile to appear where you aim, so this chapter is about adding a projectile to a player that you can move and rotate. No matter how you move or rotate the player, you can fire a projectile from the top of the player image. This chapter focuses on adding projectiles in case you want to make a simple 2D shooter game.