Space Shooter Project

I created some basic sprites in Pixlr using the appropriate sizes of 64×64/16×32.
I created a script called scr_PlayerMovement and typed in the correct code in order for my ship to strafe to the left or right.
I had to add a Rigidbody 2D to the ships and enemies and change body type to kinematic. Box colliders are also important to the enemies as it enables the player to destroy them, vanishing from the screen completely.
In order for my ship to begin firing projectiles, I created a 2nd script called scr_BulletBehaviour and followed the steps. This is what it should should like in the final product. This will allow me to shoot a bullet from the player ship.
I then created another script called scr_EnemyBehaviour and followed the required steps there.
In my Scene view, I had 5 ships slowly coming down to the player ship. This is a result of the 3rd script.
This is what the Hierarchy looks like after I finished scripting. Notice how everything is a Prefab instead of a Sprite.
This is what the game should run like now – all 5 enemy ships gradually descending down to the bottom of the screen.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *