From the course: Unity 4: 2D Essential Training

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Enabling aliens to shoot

Enabling aliens to shoot - Unity Tutorial

From the course: Unity 4: 2D Essential Training

Start my 1-month free trial

Enabling aliens to shoot

So, at this point we've created an alien that will attack the player, if the player gets too close. Let's create a new alien that will fire a projectile. In order to do this we're going to create a new scene, and we're going to call this scene, Alien C staging. We'll put this inside of our scene folder. And in our prefabs, let's drag a test platform into the scene. We'll then go into our spreadsheet folder. We'll look for aliens C, and we're going to drag spreads zero through three into the scene. From here, we'll call this AlienCAttackAnimation. And make sure that this goes inside of our animations folder. While we still have this selected, let's go into the Animations tab, and create a new animation state. We'll call this AlienCIdleAnimation, again making sure that it goes inside of the animation folder. We're going to want to change the sample rate to 12, and we'll drag the first frame of aliens C, into the timeline. Let's hit Save to save the animations, and go into the animator…

Contents