Space Shooter Construction Kit / Tutorial 03
This tutorial is continuing where we left off in the previous tutorial.
In the previous tutorial we have added a pickup to the scene.
In this tutorial we are going to add an enemy.
First you must open the scene
Assets/Playniax/Space Shooter Construction Kit/Tutorials/Tutorial 03Now go to the Unity menu
GameObject > 2D Object > Playniax > Space Shooter Art Pack 02 > Sprites > Enemies > Cube
The sprite should be visible in the scene as shown in the image above.
Now run the scene and use the mouse in combination with the mousebutton to move the spaceship and shoot the enemy until it is killed.
Stop the scene from running.
As you probably noticed the enemy is doing nothing.
The Playniax Framework has a simple script for adding behaviours to the sprites.
We are going to add a script or component called EnemyAI.
Use the
Add Component button of the Cube GameObject as shown below:

Now change the
Mode from
Homing Missile to
Cruiser as shown below:

Now run the scene.
The enemy will now cruise around and target the player.

Now continue with
Tutorial 04