DemoProductions / shmup

3 stars 2 forks source link

Player 1 shooting #4

Closed flip40 closed 8 years ago

flip40 commented 8 years ago

Get player 1 shooting bullets.

Best implementation would be to have bullets go out of the front of the player (as opposed to "the direction that should be the front of the player"). In other words, make sure it is based on where the player is facing instead of where the player is supposed to be facing. If we change the direction of scrolling for any reason, this makes changing the bullet direction a non-issue.

Also consider its implementation as we might be able to abstract it nicely so this works just as well for enemies, even enemies with turrets (where the turret as the bullet's parent can determine where the bullet goes based on where it is facing).

When shooting, Player script should spawn bullets in front of it from prefab.

Elements: Bullet script (collision handling and bullet movement) Additions to Player script (account for where the player is facing, bullet type?)