WEBVTT 1 00:00:05.465 --> 00:00:09.910 Game Advanced Edition Alpha Type Version 1 2 00:00:09.910 --> 00:00:12.078 GCC Academy 3 00:00:14.000 --> 00:00:21.000 4 00:00:27.234 --> 00:00:28.284 Hi 5 00:00:28.284 --> 00:00:31.396 This is Lee Yongho, instructor of the shooting game development course 6 00:00:31.396 --> 00:00:33.646 In this chapter, we will learn about 7 00:00:33.646 --> 00:00:36.406 the first alpha version 8 00:00:36.406 --> 00:00:40.356 The first topic of learning is upgrading the Player 9 00:00:40.356 --> 00:00:42.911 Enemy, and Bullet to the alpha version 10 00:00:42.911 --> 00:00:44.811 Next, we will add explosion effects 11 00:00:44.811 --> 00:00:46.832 and learn how to control these effects 12 00:00:48.307 --> 00:00:51.707 Next, we will create a background that scrolls to the right 13 00:00:51.707 --> 00:00:54.000 We will learn how to play sounds next 14 00:00:54.528 --> 00:00:58.280 Upgrading the Player, Enemy, and Bullet to the alpha version 15 00:00:58.604 --> 00:01:03.000 Let's start by upgrading the Player to the alpha version 16 00:01:03.000 --> 00:01:06.200 Upgrading the Player to the alpha version means that 17 00:01:06.200 --> 00:01:10.000 previously, the player was created using a cube-based model 18 00:01:10.000 --> 00:01:14.450 Let's go through the process of upgrading the Player 19 00:01:14.450 --> 00:01:17.426 to the alpha version using actual assets and data 20 00:01:17.426 --> 00:01:19.426 we will need to use the Asset Store 21 00:01:19.426 --> 00:01:21.000 in Unity to do just that 22 00:01:21.000 --> 00:01:24.000 Let's open the Asset Store in Unity 23 00:01:24.000 --> 00:01:29.250 Clicking on Asset Store in the Window menu will open 24 00:01:29.250 --> 00:01:33.525 a web browser and take you to the Asset Store page 25 00:01:33.525 --> 00:01:36.975 In the Asset Store's search section 26 00:01:36.975 --> 00:01:41.000 you can find Awesome Cartoon Airplanes 27 00:01:41.000 --> 00:01:46.000 The Awesome Cartoon Airplanes asset will be like this 28 00:01:46.000 --> 00:01:52.000 Clicking on it will take you to the Awesome Cartoon Airplanes page 29 00:01:52.000 --> 00:01:53.640 Yes, you can download this asset 30 00:01:53.640 --> 00:01:57.614 Click the Add to My Assets button there 31 00:01:57.614 --> 00:02:01.014 then it will change like this, click Open in Unity 32 00:02:01.014 --> 00:02:06.436 Once you click the button Unity will open and the Package Manager will appear 33 00:02:06.436 --> 00:02:08.686 Then in Package Manager 34 00:02:08.686 --> 00:02:11.000 You can download the Awesome Cartoon Airplanes 35 00:02:11.000 --> 00:02:14.000 Let's click download 36 00:02:14.000 --> 00:02:17.000 After some time, the download will complete, very quick 37 00:02:17.000 --> 00:02:22.000 Now from here, click the Import button 38 00:02:22.000 --> 00:02:24.650 If you click import button 39 00:02:24.650 --> 00:02:28.644 You will get a new window called Import Unity Package 40 00:02:28.644 --> 00:02:32.094 From here, we can choose assets we want 41 00:02:32.094 --> 00:02:34.129 and then add to the project 42 00:02:34.129 --> 00:02:36.129 right now, all of these are selected 43 00:02:36.129 --> 00:02:38.879 Since we want everything, have these selected 44 00:02:38.879 --> 00:02:41.000 and click import 45 00:02:41.000 --> 00:02:43.574 Click 46 00:02:43.574 --> 00:02:47.674 Now, by importing these assets, they will be added to your Unity project 47 00:02:47.674 --> 00:02:50.000 and you can start using them in your scene and game 48 00:02:50.000 --> 00:02:52.450 If you see here in the Project window 49 00:02:52.450 --> 00:02:56.287 Here, can you see Awesome Cartoon? 50 00:02:56.287 --> 00:03:01.223 In this window, we can see the assets package 51 00:03:01.223 --> 00:03:03.792 we've downloaded has been added here 52 00:03:03.792 --> 00:03:06.317 Now you can close the package manager 53 00:03:06.317 --> 00:03:10.367 In here, if you look at Awesome Cartoon Airplanes folder 54 00:03:10.367 --> 00:03:14.584 The ones we will be using are in the folder called Airplanes 55 00:03:14.584 --> 00:03:18.000 This package is in the folder of Airplanes 56 00:03:18.000 --> 00:03:20.400 For the first player 57 00:03:20.400 --> 00:03:23.653 Let's use airplane number 1 58 00:03:23.653 --> 00:03:27.653 The question is, after selecting Airplane 1 59 00:03:27.653 --> 00:03:30.000 how would we actually implement it to player 1 60 00:03:30.000 --> 00:03:35.000 Let's select Airplane 1 and set it as a child of Airplanes and register it like this 61 00:03:35.000 --> 00:03:39.000 Them, you will get a player with a model like this 62 00:03:39.000 --> 00:03:47.000 After registering, grab the model and rotate it by 90 degrees 63 00:03:47.000 --> 00:03:53.000 You can change rotation value x to 180 64 00:03:53.000 --> 00:03:59.000 Airplane 1's size is 0.25mm 65 00:03:59.000 --> 00:04:06.000 Airplane 2 is also 0.25mm 66 00:04:06.000 --> 00:04:10.000 Then, it will be as big as our Player model before 67 00:04:10.000 --> 00:04:13.000 Like this, we've changed the size to 0.25mm 68 00:04:13.000 --> 00:04:16.000 You can actually do this all at once 69 00:04:16.000 --> 00:04:23.000 You can go to Scale property 70 00:04:23.000 --> 00:04:27.000 Mouse click on this icon here 71 00:04:27.000 --> 00:04:32.000 Now, the X button that previously had a line through it no longer has the slash 72 00:04:32.000 --> 00:04:36.000 If we set this up, we can change Airplanes' options all at once 73 00:04:36.000 --> 00:04:39.000 Let's put 1 in this box and then you will see everything change into 1 74 00:04:39.000 --> 00:04:43.000 If you put 0.2, others will also change to 0.2 75 00:04:43.000 --> 00:04:47.000 change values for scale option at once 0.2 or 0.25 76 00:04:47.000 --> 00:04:52.000 0.2 value gives you a good enough 77 00:04:52.000 --> 00:04:57.000 Next, what is responsible for the appearance of the player is 78 00:04:57.000 --> 00:05:00.000 If you select it as gameObject 79 00:05:00.000 --> 00:05:04.720 You can see this a white box implemented 80 00:05:04.720 --> 00:05:10.160 Let's remove this factor select it as Player and on the right side 81 00:05:10.160 --> 00:05:17.160 Here, the Mesh Renderer and the Cube, these are what directly handle the appearance of the player 82 00:05:17.160 --> 00:05:21.400 I want to make the cube box that is responsible for the appearance invisible 83 00:05:21.400 --> 00:05:24.799 Then, right-click on these two components and select the appropriate option 84 00:05:24.799 --> 00:05:28.920 If you select Remove Component, it will remove it from the screen 85 00:05:28.920 --> 00:05:33.680 Since the Cube is not actually needed, so for Mesh Filter, remove its component as well 86 00:05:33.680 --> 00:05:36.759 Cube Mesh Filter will also disappear from the screen 87 00:05:36.759 --> 00:05:40.209 The green outline around the object is currently visible though 88 00:05:40.209 --> 00:05:42.080 How do we remove it? 89 00:05:42.080 --> 00:05:47.520 This refers to the Box Collider 90 00:05:47.520 --> 00:05:50.200 The area of the Box Collider is what represents that part 91 00:05:50.200 --> 00:05:54.080 If I disable the checkbox, you'll notice that the color changes 92 00:05:54.080 --> 00:05:57.160 The Box Collider is exactly that part 93 00:05:57.160 --> 00:05:59.480 Now, the components responsible for the appearance are done 94 00:05:59.480 --> 00:06:03.680 If you look below, you'll see that the Gizmos option is checked in the game window 95 00:06:03.680 --> 00:06:07.320 To hide the Gizmos, you can uncheck this option 96 00:06:07.320 --> 00:06:13.162 By doing this, you've successfully updated the player’s appearance 97 00:06:13.162 --> 00:06:16.012 Now, let's press the play button 98 00:06:16.012 --> 00:06:18.839 Let's check if the player is correctly applied and appears as expected 99 00:06:18.839 --> 00:06:23.040 The propeller should be spinning, and the player should be able to move left, right, up, and down 100 00:06:23.040 --> 00:06:28.440 You should be able to see that the shooting and other features are working correctly 101 00:06:28.440 --> 00:06:31.490 Now, let's learn about upgrading 102 00:06:31.490 --> 00:06:34.120 the Enemy to the alpha version 103 00:06:34.120 --> 00:06:36.559 Let's go ahead and update the Enemy in the same way 104 00:06:36.559 --> 00:06:41.459 Without downloading anything, let's use Plane 2, 3, or 4 105 00:06:41.459 --> 00:06:43.959 to work on the Enemy update 106 00:06:43.959 --> 00:06:51.360 I will use the second one to update the Enemy's appearance 107 00:06:51.440 --> 00:06:54.640 The Enemy is not in the Hierarchy yet 108 00:06:54.640 --> 00:06:57.290 so even if we want, we can't 109 00:06:57.290 --> 00:06:58.959 drag and drop it right now 110 00:06:58.959 --> 00:07:00.709 So, where is the Enemy? 111 00:07:00.709 --> 00:07:04.519 The Enemy is not in Awesome Cartoon 112 00:07:04.519 --> 00:07:09.036 if you look below, you'll find it in the Prefabs folder we created earlier 113 00:07:09.036 --> 00:07:11.559 Enemy is right in there 114 00:07:11.559 --> 00:07:15.479 How do you make it a child of the one here? 115 00:07:15.479 --> 00:07:18.079 To enable editing for this prefab 116 00:07:18.079 --> 00:07:20.174 you can double click on it 117 00:07:20.174 --> 00:07:22.324 So when you double click it 118 00:07:22.324 --> 00:07:24.624 the Hierarchy and Scene windows 119 00:07:24.624 --> 00:07:27.080 will switch to edit mode 120 00:07:27.080 --> 00:07:31.630 In the Awesome Cartoon Planes folder 121 00:07:31.630 --> 00:07:33.039 there is a Prefabs folder as well 122 00:07:33.039 --> 00:07:39.000 Drag Plane 2 from the Prefabs folder and drop it into the Enemy object 123 00:07:39.000 --> 00:07:41.450 This is the result you get and same as before 124 00:07:41.450 --> 00:07:45.600 Now, let's remove the Mesh Filter and Mesh Renderer components 125 00:07:45.600 --> 00:07:49.000 from the Enemy object that we're currently using 126 00:07:49.000 --> 00:07:52.039 Right click on the component and then Remove Component 127 00:07:52.039 --> 00:07:54.839 Right click and then Remove Component for cube as well 128 00:07:54.839 --> 00:07:56.839 Like so 129 00:07:56.839 --> 00:08:00.479 Now, only Plane 2 will be visible 130 00:08:00.479 --> 00:08:02.800 Then, where should it be facing? 131 00:08:02.800 --> 00:08:05.100 This one shouldn't look up 132 00:08:05.100 --> 00:08:08.559 like the player, looking up 133 00:08:08.559 --> 00:08:11.240 Why is that so? this one is supposed to go down 134 00:08:11.240 --> 00:08:13.990 Therefore, it should be set to face 135 00:08:13.990 --> 00:08:16.401 the opposite direction of the player 136 00:08:16.401 --> 00:08:20.676 So, you can set the rotation values and X to -180 137 00:08:20.676 --> 00:08:23.759 and 180 for Y and Z 138 00:08:23.759 --> 00:08:26.559 For X, since it's just rotating by 180 degrees 139 00:08:26.559 --> 00:08:30.320 you can leave it as is 140 00:08:30.320 --> 00:08:32.839 You can proceed with this setup without any issues 141 00:08:32.839 --> 00:08:35.720 You should adjust the size to match the player’s size 142 00:08:35.720 --> 00:08:40.039 This button, which looks like a lock, allows you to change the size for all axes at once 143 00:08:40.039 --> 00:08:43.489 Click this button, then change the value of one axis to 0.2 144 00:08:43.489 --> 00:08:47.759 This will adjust the size of all axes uniformly 145 00:08:47.759 --> 00:08:52.440 Now, the entire setup for the Enemy is complete 146 00:08:52.440 --> 00:08:54.479 The wings of the Enemy are sticking out like this 147 00:08:54.479 --> 00:08:58.240 Even if everything is correct but you still want to remove it 148 00:08:58.240 --> 00:09:01.279 there's the Box Collider on the Enemy 149 00:09:01.279 --> 00:09:05.080 In the Box Collider, you can see options for Center and Size 150 00:09:05.080 --> 00:09:08.180 The center is about where to set 151 00:09:08.180 --> 00:09:11.720 the reference point based on this middle point 152 00:09:11.720 --> 00:09:15.679 If you change the X value of the Center 153 00:09:15.679 --> 00:09:19.679 the Box Collider will move horizontally, either to the left or right 154 00:09:19.679 --> 00:09:22.079 I'll leave the Center at 0 155 00:09:22.079 --> 00:09:25.279 and then I will try scaling it from the middle 156 00:09:25.279 --> 00:09:30.399 Let's try increasing the X value in the Size section to make it larger 157 00:09:30.399 --> 00:09:33.600 Let's switch to 2D mode to view the wings more clearly 158 00:09:33.600 --> 00:09:36.320 That way, you'll be able to see it more clearly 159 00:09:36.320 --> 00:09:40.519 Once it's roughly aligned like this, you can remove it as needed 160 00:09:40.519 --> 00:09:44.079 Since it will eventually move downwards, the bullet won't collide with the tail 161 00:09:44.079 --> 00:09:46.760 This should be enough to complete the setup 162 00:09:46.760 --> 00:09:50.060 So that if it collides here 163 00:09:50.060 --> 00:09:51.399 it will be destroyed 164 00:09:51.399 --> 00:09:53.279 Now we want to implement these settings 165 00:09:53.279 --> 00:09:54.720 How do we save this? 166 00:09:54.720 --> 00:09:58.959 If you look at the right edge of the Scene window 167 00:09:58.959 --> 00:10:02.480 you'll see that Auto Save is checked 168 00:10:02.480 --> 00:10:03.760 It means it saves automatically 169 00:10:03.760 --> 00:10:06.200 if this one is enabled 170 00:10:06.200 --> 00:10:08.679 Since we saved automatically through the Prefab 171 00:10:08.679 --> 00:10:11.440 all you need to do is click the Back button 172 00:10:11.440 --> 00:10:14.720 and it will return you to the original Scene view 173 00:10:14.720 --> 00:10:19.720 Since the Enemy has been properly updated in the Prefab 174 00:10:19.720 --> 00:10:24.399 when you click Play, you should be able to see 175 00:10:24.399 --> 00:10:26.480 Enemy's appearance in the game window 176 00:10:26.480 --> 00:10:31.839 It has been updated like this 177 00:10:31.839 --> 00:10:34.399 Since the Scene view looks strange 178 00:10:34.399 --> 00:10:38.160 I'll go back and set it to the Back 179 00:10:38.160 --> 00:10:41.040 Shall we place it so that the player is visible? 180 00:10:41.040 --> 00:10:45.760 I'll set it up like this and continue working 181 00:10:45.760 --> 00:10:47.960 So far, we've upgraded the Enemy 182 00:10:47.960 --> 00:10:51.359 to the alpha version 183 00:10:51.359 --> 00:10:52.920 Next, let's continue 184 00:10:52.920 --> 00:10:54.970 and upgrade the Bullet 185 00:10:54.970 --> 00:10:57.399 to the alpha version 186 00:10:57.399 --> 00:11:00.679 Let's search for Rockets 187 00:11:00.679 --> 00:11:10.079 Missiles and Bombs 188 00:11:10.079 --> 00:11:12.320 to find the assets we'll use here 189 00:11:12.320 --> 00:11:17.040 If you search for Rockets, Missiles 190 00:11:17.040 --> 00:11:20.920 you'll see it at the right end of the search results 191 00:11:20.920 --> 00:11:24.559 Then, just like before, you'll find a page where you can download this asset 192 00:11:24.559 --> 00:11:31.000 When you click Open in Unity, the Package Manager will open again 193 00:11:31.000 --> 00:11:33.000 In the Package Manager 194 00:11:33.000 --> 00:11:35.720 you can download the asset you want 195 00:11:35.720 --> 00:11:37.959 Let's click download 196 00:11:37.959 --> 00:11:40.359 Once it's done, it didn't take long 197 00:11:40.359 --> 00:11:43.000 Let's click that import button 198 00:11:43.000 --> 00:11:46.239 In the Import Unity Package, click Import button 199 00:11:46.239 --> 00:11:48.880 to bring every asset 200 00:11:48.880 --> 00:11:52.160 it worked and in here 201 00:11:52.160 --> 00:11:54.410 there's Orion Sky's asset 202 00:11:54.410 --> 00:11:56.160 Rockets, Missiles and Bombs 203 00:11:56.160 --> 00:11:57.410 Here, what we are going to use is 204 00:11:57.410 --> 00:12:00.480 the assets inside the Prefabs folder 205 00:12:00.480 --> 00:12:02.600 Which one we are going to use is 206 00:12:02.600 --> 00:12:06.640 To match Player's color, in the Yellow 207 00:12:06.640 --> 00:12:09.040 I'll use number 8 Rockets 208 00:12:09.040 --> 00:12:12.880 So how did we upgrade it to the alpha version? 209 00:12:12.880 --> 00:12:15.640 Just like the other one 210 00:12:15.640 --> 00:12:19.279 we need to go to Prefabs folder 211 00:12:19.279 --> 00:12:22.920 Click on the asset and go to the Prefabs folder 212 00:12:22.920 --> 00:12:25.359 where you’ll find the Bullet 213 00:12:25.359 --> 00:12:29.480 Double click the Bullet Prefab to open it 214 00:12:29.480 --> 00:12:31.399 Then you'll get edit mode 215 00:12:31.399 --> 00:12:34.760 The Yellow 8 that we selected earlier 216 00:12:34.760 --> 00:12:36.920 Let's drag and drop 217 00:12:36.920 --> 00:12:39.640 the Yellow 8 into the Bullet as a child 218 00:12:39.640 --> 00:12:42.799 Click Reset on the Transform to reset 219 00:12:42.799 --> 00:12:44.760 Then it appears 220 00:12:44.760 --> 00:12:48.880 It might appear in an odd position because it's placed incorrectly 221 00:12:48.880 --> 00:12:50.320 It's too big 222 00:12:50.320 --> 00:12:55.839 I will scale it down overall 223 00:12:55.839 --> 00:12:59.640 to about 0.15 224 00:12:59.640 --> 00:13:03.040 Reset the Bullet's Transform as well 225 00:13:03.040 --> 00:13:06.559 and then adjust it again as needed 226 00:13:06.559 --> 00:13:08.880 I'll click Reset on the Bullet's Transform 227 00:13:08.880 --> 00:13:10.880 to restore it to its original position 228 00:13:10.880 --> 00:13:15.000 and then the size value would still be 0.15 229 00:13:15.000 --> 00:13:18.200 this is the size of it 230 00:13:18.200 --> 00:13:20.000 all good so far 231 00:13:20.000 --> 00:13:23.640 Right now, the collider is way too big right now 232 00:13:23.640 --> 00:13:27.399 And also, it's centered in the wrong position 233 00:13:27.399 --> 00:13:29.040 there's unnecessary gap 234 00:13:29.040 --> 00:13:31.799 Therefore, we need to adjust 235 00:13:31.799 --> 00:13:33.919 the center point and for the collider 236 00:13:33.919 --> 00:13:35.280 to fit the actual shape 237 00:13:35.280 --> 00:13:39.359 First, let's remove the Cube that is used for the collider 238 00:13:39.359 --> 00:13:42.320 Right click on the Mesh Renderer and Mesh Filter 239 00:13:42.320 --> 00:13:46.359 then select Remove Component to delete them 240 00:13:46.359 --> 00:13:49.080 Then only the collider area will remain 241 00:13:49.080 --> 00:13:53.520 Next, let's reduce the X size of the Box Collider to better fit the Bullet 242 00:13:53.520 --> 00:13:56.039 Like so 243 00:13:56.039 --> 00:13:58.080 Let's try 0.5 244 00:13:58.080 --> 00:14:00.280 0.5 245 00:14:00.280 --> 00:14:03.760 0.45? 246 00:14:03.760 --> 00:14:05.760 0.45 fits the most perfectly 247 00:14:05.760 --> 00:14:09.719 Now, let's move the center upward appropriately 248 00:14:09.719 --> 00:14:11.840 For the collider's center value 249 00:14:11.880 --> 00:14:13.919 the Y value 250 00:14:13.919 --> 00:14:19.840 Let's increase the Y value by 0.07 251 00:14:19.840 --> 00:14:22.119 then we still have some gaps 252 00:14:22.119 --> 00:14:26.039 Let's change Y value to 0.9 253 00:14:26.039 --> 00:14:29.400 this should work fine 254 00:14:32.239 --> 00:14:34.239 So, by processing it like this 255 00:14:34.239 --> 00:14:35.739 when we select the Bullet 256 00:14:35.739 --> 00:14:38.640 it should be around this size 257 00:14:38.640 --> 00:14:40.479 Let's put 0.5 for size 258 00:14:40.479 --> 00:14:43.400 I'll make slight adjustments for the Bullet to be perfectly sized 259 00:14:43.400 --> 00:14:49.479 allowing it to fit with other objects as well 260 00:14:49.479 --> 00:14:54.840 Now, the Bullet's Prefab has been properly set up and is working correctly 261 00:14:54.840 --> 00:14:58.000 Now let's click Back button 262 00:14:58.000 --> 00:15:01.719 And see what we've got through a test 263 00:15:01.719 --> 00:15:05.760 Now, play 264 00:15:05.760 --> 00:15:09.880 You can confirm that the bullet is firing correctly now 265 00:15:09.880 --> 00:15:15.159 You can confirm that both the Enemy and Player 266 00:15:15.159 --> 00:15:18.239 have been updated to the actual data we want to use 267 00:15:18.239 --> 00:15:21.775 So, we've seen how to upgrade the Bullet 268 00:15:21.775 --> 00:15:23.358 to the alpha version up to this point 269 00:15:23.691 --> 00:15:27.473 Adding the explosion effect 270 00:15:29.159 --> 00:15:34.320 This time, when we play, there are a lot of parts that feel a bit boring 271 00:15:34.320 --> 00:15:37.479 So, let's add an explosion effect to make it more interesting 272 00:15:37.479 --> 00:15:40.919 Right now, what we’re working on feels a bit plain 273 00:15:40.919 --> 00:15:44.679 The bullets are firing and everything seems to be moving 274 00:15:44.679 --> 00:15:47.919 but it still feels lacking in excitement 275 00:15:47.919 --> 00:15:50.320 Exactly, to solve this, we will add an explosion effect 276 00:15:50.320 --> 00:15:53.359 to enhance the impact and make it feel more satisfying 277 00:15:53.359 --> 00:15:58.559 Let's use the Asset Store to find an explosion effect 278 00:15:58.559 --> 00:16:01.640 Go to asset store page 279 00:16:01.640 --> 00:16:11.760 Let's search for Cartoon FX Free here in the Asset Store 280 00:16:11.760 --> 00:16:17.080 Search Cartoon FX Free 281 00:16:17.080 --> 00:16:19.480 The one we will be using from here is 282 00:16:19.480 --> 00:16:21.799 This one right here 283 00:16:21.799 --> 00:16:27.799 the name is Cartoon FX Remaster Free 284 00:16:27.799 --> 00:16:29.880 Click this 285 00:16:29.880 --> 00:16:33.559 Click Open in Unity button 286 00:16:33.559 --> 00:16:42.400 The Package Manager will open, and the download will begin 287 00:16:42.400 --> 00:16:45.200 Once the download is complete, click the Import button 288 00:16:45.200 --> 00:16:49.239 to open the Import Unity Package window 289 00:16:49.239 --> 00:16:56.559 Let's Import it into Unity 290 00:16:56.559 --> 00:16:59.239 Once it's done 291 00:16:59.239 --> 00:17:02.919 it will be added to our Project window 292 00:17:02.919 --> 00:17:07.320 This time, there’s quite a bit of content to import 293 00:17:07.320 --> 00:17:10.239 A new window will appear like this as well 294 00:17:10.239 --> 00:17:14.479 I will hide this window and click to close it 295 00:17:14.479 --> 00:17:17.200 and also close the package manager window 296 00:17:17.200 --> 00:17:21.159 Now, in the Package Manager, the button 297 00:17:21.159 --> 00:17:24.200 for the downloaded asset will show JMO Assets 298 00:17:24.200 --> 00:17:26.200 In JMO Assets 299 00:17:26.200 --> 00:17:28.559 you'll find Demo Assets, and within that 300 00:17:28.559 --> 00:17:32.359 there is a demo scene file 301 00:17:32.359 --> 00:17:34.880 Do you see this Unity logo mark over here? 302 00:17:34.880 --> 00:17:38.039 There is Unity mark icon 303 00:17:38.039 --> 00:17:40.359 This is the Scene file 304 00:17:40.359 --> 00:17:42.440 Let's double click on the Scene file 305 00:17:42.440 --> 00:17:48.119 When you open it, you'll see this section that allows you to run 306 00:17:48.119 --> 00:17:52.760 Let's click on play button 307 00:17:52.760 --> 00:17:55.119 I'll increase the size of this window 308 00:17:55.119 --> 00:17:58.440 There is some kind of arrow and there are numbers from 1 to 31 309 00:17:58.440 --> 00:18:01.000 If I do a left mouse click 310 00:18:01.000 --> 00:18:03.880 We can see the explosion effect on click 311 00:18:03.880 --> 00:18:08.599 When you press the left or right arrow keys, it changes like this 312 00:18:08.599 --> 00:18:11.080 The effect changes 313 00:18:11.080 --> 00:18:15.559 There's also one with some flame 314 00:18:15.559 --> 00:18:18.000 effects like this again 315 00:18:18.000 --> 00:18:20.799 also like this 316 00:18:20.799 --> 00:18:24.919 or like this 317 00:18:24.919 --> 00:18:28.840 How should we make the plane to be destroyed 318 00:18:28.840 --> 00:18:30.919 Wow, there's even a huge explosion! 319 00:18:30.919 --> 00:18:34.719 You can select the ones you want from this list 320 00:18:34.719 --> 00:18:39.080 If you look, right now 321 00:18:39.080 --> 00:18:41.640 There's some kind of writing under the arrows and numbers 322 00:18:41.640 --> 00:18:45.599 If you want to see where these are activated 323 00:18:45.599 --> 00:18:47.599 you can open them like this to check 324 00:18:47.599 --> 00:18:52.039 In the demo script, you will see a list 325 00:18:52.039 --> 00:18:54.599 and one of them will be highlighted 326 00:18:54.599 --> 00:18:57.960 If I click here 327 00:18:57.960 --> 00:19:02.559 you'll notice that the items being used are 328 00:19:02.559 --> 00:19:03.760 all grayed out and deactivated 329 00:19:03.760 --> 00:19:07.039 You can see that it's only activated when I click, and that's when it becomes visible 330 00:19:07.039 --> 00:19:10.599 Right now, it is using 331 00:19:10.599 --> 00:19:12.599 CFX R3 Hit Light 332 00:19:12.599 --> 00:19:15.320 Alternatively, if you look at what is being displayed right now 333 00:19:15.320 --> 00:19:19.599 If you double-click on the object called Canvas and click on it 334 00:19:19.599 --> 00:19:23.200 The screen will shift to the view where the Canvas is located 335 00:19:23.200 --> 00:19:30.080 Then, I'll zoom in to take a closer look 336 00:19:30.080 --> 00:19:35.520 Here, where is it? 337 00:19:35.520 --> 00:19:42.760 Here is the name, CFX R3 Hit Light 338 00:19:42.760 --> 00:19:50.000 We just need to locate this part and work with it 339 00:19:50.000 --> 00:19:56.280 Then where is this thing, I said to look at demo script here 340 00:19:56.280 --> 00:19:58.919 The one that appears when you click here 341 00:19:58.919 --> 00:20:02.239 If you select that and right mouse click 342 00:20:02.239 --> 00:20:07.320 If you right-click and scroll down 343 00:20:07.320 --> 00:20:09.440 you'll see the option called Prefab 344 00:20:09.440 --> 00:20:13.679 you can scroll down and enter it like this 345 00:20:13.679 --> 00:20:15.280 When you want to take one of these 346 00:20:18.000 --> 00:20:21.000 right click on it, since it is currently in Prefab state 347 00:20:21.000 --> 00:20:22.000 I will turn off the play button 348 00:20:22.000 --> 00:20:24.000 Then it is added as Prefab state 349 00:20:24.000 --> 00:20:26.000 After right mouse click 350 00:20:26.000 --> 00:20:28.000 and go to Prefab menu 351 00:20:28.000 --> 00:20:32.000 There is an option called Open Asset in Content 352 00:20:32.000 --> 00:20:36.000 Do you see it? 353 00:20:36.000 --> 00:20:39.000 Click Select Asset 354 00:20:39.000 --> 00:20:42.000 What happens? The link to 355 00:20:42.000 --> 00:20:44.000 where the window is appears 356 00:20:44.000 --> 00:20:46.000 It let us to jump there right away 357 00:20:46.000 --> 00:20:48.000 For others as well, mouse right click 358 00:20:48.000 --> 00:20:51.000 In Prefab, click Select Asset 359 00:20:51.000 --> 00:20:55.000 Then you can go to the location where the Asset is 360 00:20:55.000 --> 00:20:56.000 Do you see it? 361 00:20:56.000 --> 00:21:00.000 The one we will be using among these 362 00:21:00.000 --> 00:21:02.000 is the explosion effect 363 00:21:02.000 --> 00:21:04.000 So let's use Assets that are 364 00:21:04.000 --> 00:21:06.000 in the Explosion folder 365 00:21:06.000 --> 00:21:11.000 And this Fire effect 366 00:21:11.000 --> 00:21:14.000 or this other one 367 00:21:14.000 --> 00:21:17.000 so that we also have some smoke 368 00:21:17.000 --> 00:21:19.000 If you look, this one is the second one 369 00:21:19.000 --> 00:21:21.000 Let's see what it looks like when we actually play 370 00:21:21.000 --> 00:21:24.000 See how it's like 371 00:21:24.000 --> 00:21:26.000 I think this one is pretty good 372 00:21:26.000 --> 00:21:32.000 Compare between these two 373 00:21:32.000 --> 00:21:37.000 After explosion, even the screen shakes 374 00:21:37.000 --> 00:21:39.000 I like the first one 375 00:21:39.000 --> 00:21:41.000 and the second one is also good 376 00:21:41.000 --> 00:21:43.000 I will choose the one 377 00:21:43.000 --> 00:21:46.000 that has smoke after explosion 378 00:21:46.000 --> 00:21:47.000 How do we set the position? 379 00:21:47.000 --> 00:21:50.000 Right mouse click on Prefab 380 00:21:50.000 --> 00:21:52.000 find Select Asset 381 00:21:52.000 --> 00:21:54.000 And then it will find its location 382 00:21:54.000 --> 00:21:56.000 Let's use this one 383 00:21:56.000 --> 00:21:59.000 To enable the effect 384 00:21:59.000 --> 00:22:02.000 Let's adjust our script first 385 00:22:02.000 --> 00:22:05.000 Let's open default Scene file 386 00:22:05.000 --> 00:22:07.000 In the scene, Sample Scene 387 00:22:07.000 --> 00:22:10.000 This is what we've been working with 388 00:22:10.000 --> 00:22:12.000 Can't we use our Scene? 389 00:22:12.000 --> 00:22:13.000 We can change the name 390 00:22:13.000 --> 00:22:17.000 Or in the file, make a copy 391 00:22:17.000 --> 00:22:20.000 by clicking Save As 392 00:22:20.000 --> 00:22:21.000 in order to make use of it 393 00:22:21.000 --> 00:22:23.000 However, there are rules to this 394 00:22:23.000 --> 00:22:24.000 What kind of a rule? 395 00:22:24.000 --> 00:22:27.000 This one must stay in the Asset Folder 396 00:22:27.000 --> 00:22:29.000 It shouldn't stay outside the folder 397 00:22:29.000 --> 00:22:31.000 Remember, that's the rule 398 00:22:31.000 --> 00:22:34.000 You have to save this Scene file inside the Asset Folder 399 00:22:34.000 --> 00:22:35.000 If we were to save it in this Scene 400 00:22:35.000 --> 00:22:38.000 as Shooting Scene 401 00:22:38.000 --> 00:22:42.000 Save it as Shooting Scene 402 00:22:42.000 --> 00:22:44.000 You have to save it here 403 00:22:44.000 --> 00:22:47.000 You shouldn't save it outside the Asset Folder 404 00:22:47.000 --> 00:22:48.000 Save 405 00:22:48.000 --> 00:22:50.000 Then we can see that there's a new scene called Shooting Scene 406 00:22:50.000 --> 00:22:53.000 and if you double click 407 00:22:53.000 --> 00:22:55.000 in the Hierarchy 408 00:22:55.000 --> 00:22:58.000 Do you see a Scene file named Sample Scene? 409 00:22:58.000 --> 00:23:01.000 When Shooting Scene opens 410 00:23:01.000 --> 00:23:03.000 you’ll see that the window switches to Shooting Scene 411 00:23:03.000 --> 00:23:06.000 or you can open multiple scenes when working 412 00:23:06.000 --> 00:23:08.000 just like here 413 00:23:08.000 --> 00:23:11.000 if you drag and drop the Sample Scene here 414 00:23:11.000 --> 00:23:13.000 you can see the structure of Unity 415 00:23:13.000 --> 00:23:16.000 where two scenes open at the same time 416 00:23:16.000 --> 00:23:17.000 do you see it? 417 00:23:17.000 --> 00:23:19.000 you can have two Scenes 418 00:23:19.000 --> 00:23:20.000 at the same time 419 00:23:20.000 --> 00:23:24.000 When I made a change up here, the change follows down there as well 420 00:23:24.000 --> 00:23:28.000 Like this, you can have two scenes opened up 421 00:23:28.000 --> 00:23:30.000 If you want to remove one 422 00:23:30.000 --> 00:23:31.000 you can right mouse click on it 423 00:23:31.000 --> 00:23:32.000 How? 424 00:23:32.000 --> 00:23:35.000 Select Remove Scene 425 00:23:35.000 --> 00:23:38.000 Unload Scene is to only disable it 426 00:23:38.000 --> 00:23:39.000 How again? 427 00:23:39.000 --> 00:23:40.000 If you click Remove Scene 428 00:23:40.000 --> 00:23:43.000 you are removing the registered file 429 00:23:43.000 --> 00:23:45.000 It won't remove any original data 430 00:23:45.000 --> 00:23:48.000 so that's that 431 00:23:48.000 --> 00:23:50.000 So, we are working 432 00:23:50.000 --> 00:23:52.000 in the Shooting Scene 433 00:23:52.000 --> 00:23:57.000 Where do we use the explosion effect then? 434 00:23:57.000 --> 00:24:05.000 In the Script window, let's open Enemy Script 435 00:24:05.000 --> 00:24:09.000 Then, we will have the effect process here 436 00:24:09.000 --> 00:24:11.000 the reason we do that here is simple 437 00:24:11.000 --> 00:24:15.000 Think about where the explosion effect should occur 438 00:24:15.000 --> 00:24:20.000 Let's check this diagram 439 00:24:20.000 --> 00:24:23.000 The collision we implemented 440 00:24:23.000 --> 00:24:25.000 with Enemy, Player or Bullet 441 00:24:25.000 --> 00:24:28.000 When colliding, the way they collide is 442 00:24:28.000 --> 00:24:31.000 that Player and Enemy were able to collide 443 00:24:31.000 --> 00:24:34.000 And one more, Enemy and Bullet 444 00:24:34.000 --> 00:24:37.000 were made possible to collide each other 445 00:24:37.000 --> 00:24:41.000 and Player and Bullet weren't allowed to collide each other 446 00:24:41.000 --> 00:24:43.000 and between Enemies as well 447 00:24:43.000 --> 00:24:46.000 We made these rules at a default setting level 448 00:24:46.000 --> 00:24:51.000 So, in a way, if Player and Bullet cannot collide 449 00:24:51.000 --> 00:24:55.000 who would be the common denominator between Player and Enemy? 450 00:24:55.000 --> 00:24:58.000 Since the denominator comes down to Enemy 451 00:24:58.000 --> 00:25:00.000 So if to say Enemies go Kamikaze on us 452 00:25:00.000 --> 00:25:05.000 It can eliminate both the player and the bullets 453 00:25:05.000 --> 00:25:07.000 So, how is the script set up? 454 00:25:07.000 --> 00:25:11.000 collision handling is being processed in the Enemy script 455 00:25:11.000 --> 00:25:14.000 Then, if the Enemy explodes when it collides 456 00:25:14.000 --> 00:25:17.000 How about if both are eliminated 457 00:25:17.000 --> 00:25:21.000 and an explosion effect is triggered when it collides? 458 00:25:21.000 --> 00:25:25.000 We can display it as if everyone exploded 459 00:25:25.000 --> 00:25:28.000 So, I will implement adding an explosion effect 460 00:25:28.000 --> 00:25:33.000 In the Enemy script when it collides 461 00:25:33.000 --> 00:25:35.000 The part we're referring to is located at the bottom 462 00:25:35.000 --> 00:25:42.000 the OnCollisionEnter in the Enemy.cs 463 00:25:42.000 --> 00:25:46.000 When Enemy collides with other object 464 00:25:46.000 --> 00:25:50.000 what do we want to do? 465 00:25:50.000 --> 00:25:55.000 We want to have explosion effect 466 00:25:55.000 --> 00:26:00.000 want to trigger the explosion effect to be exact 467 00:26:00.000 --> 00:26:05.000 Then where do we make Bullet? 468 00:26:05.000 --> 00:26:08.000 we make it from the bulletFactory 469 00:26:08.000 --> 00:26:10.000 And then where do we make Enemy? 470 00:26:10.000 --> 00:26:11.000 Also from enemyFactory 471 00:26:11.000 --> 00:26:14.000 Same should go with explosion, where? 472 00:26:14.000 --> 00:26:16.000 Should be made from 473 00:26:16.000 --> 00:26:19.000 Let's do it this way 474 00:26:19.000 --> 00:26:22.000 Therefore, this one is in need of certain property 475 00:26:22.000 --> 00:26:26.000 I will add the properties needed for the explosion at the top 476 00:26:26.000 --> 00:26:32.000 At the top here, we need a explosionFactory 477 00:26:32.000 --> 00:26:42.000 Write Public GameObject then explosionFactory 478 00:26:42.000 --> 00:26:46.000 explosionFactory 479 00:26:46.000 --> 00:26:52.000 So we've just declared an explosionFactory 480 00:26:52.000 --> 00:26:56.000 If you go to Unity 481 00:26:56.000 --> 00:27:00.000 Let's take a look at Enemy Prefab 482 00:27:00.000 --> 00:27:03.000 If you go to the Inspector window on the right 483 00:27:03.000 --> 00:27:08.000 The explosionFactory is exposed in the Enemy script 484 00:27:08.000 --> 00:27:11.000 To this part, drag and drop 485 00:27:11.000 --> 00:27:18.000 Explosion part from CFXS Prefab in JMOSS 486 00:27:18.000 --> 00:27:23.000 to CFXS Prefab, drag Explosion part 487 00:27:23.000 --> 00:27:30.000 and drop into explosionFactory 488 00:27:30.000 --> 00:27:32.000 Then to the Asset we are going to utilize 489 00:27:32.000 --> 00:27:37.000 will have explosionFactory registered 490 00:27:37.000 --> 00:27:42.000 Since it's registered in here 491 00:27:42.000 --> 00:27:47.000 Let's go down and try to trigger the explosion effect 492 00:27:47.000 --> 00:27:49.000 Triggering explosion effect means 493 00:27:49.000 --> 00:27:51.650 Eventually means, from bulletFactory or 494 00:27:51.650 --> 00:27:55.000 explosionFactory, making explosion 495 00:27:55.000 --> 00:27:57.000 Then, how do we make it happen 496 00:27:57.000 --> 00:28:00.000 start with Instantiate 497 00:28:00.000 --> 00:28:02.800 explosionFactory 498 00:28:02.800 --> 00:28:07.000 put explosionFactory inside 499 00:28:07.000 --> 00:28:11.000 if you do this, making explosion is done so far 500 00:28:11.000 --> 00:28:14.000 then where is this? 501 00:28:14.000 --> 00:28:16.000 It is placed at a default location 502 00:28:16.000 --> 00:28:19.000 we have to set up its location, too 503 00:28:19.000 --> 00:28:21.000 Where is this effect supposed to occur? 504 00:28:21.000 --> 00:28:23.000 It has to occur where Enemy is 505 00:28:23.000 --> 00:28:30.000 Therefore, start with GameObject explosion 506 00:28:30.000 --> 00:28:33.000 make a variable, that saves Instance 507 00:28:33.000 --> 00:28:39.000 and in the next line, who has the location of explosion? 508 00:28:39.000 --> 00:28:40.950 transform dot position 509 00:28:40.950 --> 00:28:43.277 In what location should we set it to? 510 00:28:43.277 --> 00:28:45.077 Enemy will be the one exploding 511 00:28:45.077 --> 00:28:49.000 Having the effect at Enemy's location will do 512 00:28:49.000 --> 00:28:51.000 So, transform dot position 513 00:28:51.000 --> 00:28:54.000 Right now, we are at Enemy 514 00:28:54.000 --> 00:28:56.000 we are on a Enemy script 515 00:28:56.000 --> 00:28:58.500 So since this is Enemy's transform position 516 00:28:58.500 --> 00:29:01.000 The location we want is its own location 517 00:29:01.000 --> 00:29:04.000 I have set it up so that the explosion effect occurs 518 00:29:04.000 --> 00:29:06.000 at the Enemy's location 519 00:29:06.000 --> 00:29:09.000 Let's save and comeback to Unity 520 00:29:09.000 --> 00:29:13.000 Play 521 00:29:13.000 --> 00:29:16.000 Then it moves like this 522 00:29:16.000 --> 00:29:19.000 How's this? 523 00:29:19.000 --> 00:29:23.935 Even the screen shakes 524 00:29:23.935 --> 00:29:28.000 explosion effect occurring 525 00:29:28.000 --> 00:29:30.000 How was screen shake effect created? 526 00:29:30.000 --> 00:29:35.000 What that means is, in this explosion effect part, there is this script 527 00:29:35.000 --> 00:29:38.800 If you look below this script, in the script called CFXR Effect 528 00:29:38.800 --> 00:29:42.650 the very bottom, it’s being distributed 529 00:29:42.650 --> 00:29:45.772 the effect is being processed 530 00:29:45.772 --> 00:29:48.000 there is an option called Camera Shake 531 00:29:48.000 --> 00:29:50.017 Inside this, it takes the Main Camera 532 00:29:50.017 --> 00:29:52.567 handles everything on its own 533 00:29:52.567 --> 00:29:54.683 and then updates the content 534 00:29:54.683 --> 00:29:56.000 If we don't want any shaking effect 535 00:29:56.000 --> 00:30:00.723 we simply can disable Camera Shake 536 00:30:00.723 --> 00:30:03.705 After disabling, let's play to see what happens 537 00:30:09.320 --> 00:30:12.020 Bang Bang Bang, how is it like? 538 00:30:12.020 --> 00:30:15.520 there's only explosion but without camera shaking 539 00:30:15.520 --> 00:30:19.351 you can see that it worked, it's done 540 00:30:19.351 --> 00:30:23.151 We will proceed with this setting 541 00:30:23.151 --> 00:30:26.151 Like so, we disabled 542 00:30:26.151 --> 00:30:29.120 cameraShake 543 00:30:29.120 --> 00:30:31.820 By doing this, we have applied the explosion effect scene 544 00:30:31.820 --> 00:30:34.523 in the alpha version so far 545 00:30:34.820 --> 00:30:38.751 Adding Background Playing Sound Effects 546 00:30:40.208 --> 00:30:43.058 Next order of business is to add background image 547 00:30:43.058 --> 00:30:45.200 The scene feels a bit dull having no background 548 00:30:45.200 --> 00:30:49.100 The level of completion for this content is still not high at the moment 549 00:30:49.100 --> 00:30:52.080 So, we will add a background this time to enhance it 550 00:30:52.080 --> 00:30:54.480 If you look at things like bottles 551 00:30:54.480 --> 00:30:59.599 you can often see tape with advertising slogans on them 552 00:30:59.599 --> 00:31:02.499 These things are wrapped around the back like this 553 00:31:02.499 --> 00:31:05.800 For example, it's wrapping a plastic sheet around it 554 00:31:05.800 --> 00:31:08.800 And there are some writings in there 555 00:31:08.800 --> 00:31:15.750 like the name of the drink like New Drink for example 556 00:31:15.750 --> 00:31:19.800 How about we rotate the bottle 557 00:31:19.800 --> 00:31:21.400 then what happens? 558 00:31:21.400 --> 00:31:27.296 this sentence will be disappearing little by little 559 00:31:27.296 --> 00:31:28.663 it will be on the other side 560 00:31:28.663 --> 00:31:32.519 and a new sentence or content will be show up 561 00:31:32.519 --> 00:31:33.969 because we rotated it 562 00:31:33.969 --> 00:31:36.219 In other words, when we rotate a single sheet 563 00:31:36.219 --> 00:31:38.839 where should we focus our view? 564 00:31:38.839 --> 00:31:41.189 We should focus our view right on this part 565 00:31:41.189 --> 00:31:45.800 Let's assume we fix our screen only on this part 566 00:31:45.800 --> 00:31:46.850 How is it like then? 567 00:31:46.850 --> 00:31:49.150 It might look like something is continuously moving, right? 568 00:31:49.150 --> 00:31:51.900 You can script the screen in this way 569 00:31:51.900 --> 00:31:53.279 with one sheet 570 00:31:53.279 --> 00:31:55.929 Since we've been using Asset Store 571 00:31:55.929 --> 00:31:58.160 might as well use it for this one as well 572 00:31:58.160 --> 00:32:01.010 The most common and straightforward option here would be a space image 573 00:32:01.010 --> 00:32:05.985 Space Star Field Backgrounds 574 00:32:07.839 --> 00:32:11.139 When you search like this 575 00:32:11.139 --> 00:32:15.320 You will find a file called Space Star Field Backgrounds 576 00:32:15.320 --> 00:32:18.633 Among them, let's use the one 577 00:32:18.633 --> 00:32:20.520 with space image should be easier than others 578 00:32:20.520 --> 00:32:24.870 Since this one has white dots in the black background 579 00:32:24.870 --> 00:32:28.440 When it's wrapped, it probably won't be very noticeable 580 00:32:28.440 --> 00:32:30.590 Let's select this one 581 00:32:30.590 --> 00:32:34.130 The price is FREE 582 00:32:34.130 --> 00:32:36.730 This is the space image and I will use this one 583 00:32:36.730 --> 00:32:37.997 Open in Unity 584 00:32:40.189 --> 00:32:44.683 And download the image 585 00:32:44.683 --> 00:32:49.233 Once the download is complete, click the Import button 586 00:32:49.233 --> 00:32:54.160 and then click Import to add it to the project 587 00:32:54.160 --> 00:33:00.090 After adding it, the file we just downloaded 588 00:33:00.090 --> 00:33:02.000 should be under the StarfieldMaterials folder 589 00:33:02.000 --> 00:33:05.600 If you look at this texture image 590 00:33:05.600 --> 00:33:09.000 Here, you can see that there are 591 00:33:09.000 --> 00:33:10.919 a lot of images we want to use 592 00:33:10.919 --> 00:33:14.520 Right? 593 00:33:14.520 --> 00:33:18.420 Click the plus button to create a new folder 594 00:33:18.420 --> 00:33:24.440 and then place the Materials in that folder 595 00:33:24.440 --> 00:33:27.740 Create a Materials folder 596 00:33:27.740 --> 00:33:29.897 and then create a new Material inside that folder 597 00:33:29.897 --> 00:33:33.597 In the Project window, click the plus button in the Materials folder 598 00:33:33.597 --> 00:33:36.839 and you'll see the Material option in the center 599 00:33:36.839 --> 00:33:39.389 Create it there 600 00:33:39.389 --> 00:33:46.160 Let's name it Mat Background and add it 601 00:33:46.160 --> 00:33:50.760 This material has been created 602 00:33:50.760 --> 00:33:53.360 and now let's add the material 603 00:33:53.360 --> 00:33:54.399 we want to use to it 604 00:33:54.399 --> 00:33:56.499 Let's add the value to the Albedo property 605 00:33:56.499 --> 00:34:00.149 If you look in the StarfieldMaterial 606 00:34:00.149 --> 00:34:03.399 you'll see an option called SingleNeb 607 00:34:03.399 --> 00:34:06.799 We will use something more noticeable 608 00:34:06.799 --> 00:34:10.999 like option 7 from here 609 00:34:10.999 --> 00:34:14.679 In the Materials folder, select it again 610 00:34:14.679 --> 00:34:20.479 Then, for the Albedo section, click and hold on SingleNeb 611 00:34:20.479 --> 00:34:23.507 and drag option 7 into the Albedo slot 612 00:34:23.507 --> 00:34:28.445 By holding it there, it will be registered properly 613 00:34:28.445 --> 00:34:32.679 Now, you can see the preview like this 614 00:34:32.679 --> 00:34:36.129 If you don't want it to be displayed as a circle 615 00:34:36.129 --> 00:34:37.579 we can change that 616 00:34:37.579 --> 00:34:39.429 If you click different options 617 00:34:39.429 --> 00:34:42.102 This part right here 618 00:34:42.102 --> 00:34:45.102 If you click this, the shape of the object 619 00:34:45.102 --> 00:34:48.728 This is cylinder, tube 620 00:34:48.728 --> 00:34:51.078 and then square plain shape 621 00:34:51.078 --> 00:34:52.985 It's like this 622 00:34:55.513 --> 00:34:57.913 Sphere, cube and so on 623 00:34:57.913 --> 00:35:00.839 we can switch between different shapes 624 00:35:00.839 --> 00:35:03.539 Like this 625 00:35:03.539 --> 00:35:06.239 Since we are having square background 626 00:35:06.239 --> 00:35:08.436 Let's use this shape and see what it will look like 627 00:35:11.879 --> 00:35:15.607 With this setup, let's go ahead and create 628 00:35:15.607 --> 00:35:18.408 the background where it will be applied 629 00:35:18.408 --> 00:35:23.008 In the Hierarchy, click the plus button 630 00:35:23.008 --> 00:35:28.000 then go to 3D Object and add a Quad 631 00:35:28.000 --> 00:35:32.000 Next, let's rename it to Background 632 00:35:34.119 --> 00:35:37.369 The size is very small 633 00:35:37.369 --> 00:35:40.919 So let's enlarge it a bit 634 00:35:40.919 --> 00:35:43.669 To make it fill the screen more 635 00:35:43.669 --> 00:35:47.266 Let's zoom in 636 00:35:47.266 --> 00:35:49.866 As you stretch it horizontally 637 00:35:49.866 --> 00:35:52.716 Take a look at it from the Game view 638 00:35:52.716 --> 00:35:54.919 and you'll see it start to fill the screen 639 00:35:54.919 --> 00:35:57.840 You can adjust it to fit reasonably well like this 640 00:35:57.840 --> 00:36:02.160 Set the value to around 14, and 14 for X as well 641 00:36:02.160 --> 00:36:06.800 Then, stretch the Y value to adjust it accordingly 642 00:36:06.800 --> 00:36:09.959 Set the Y value to around 20 643 00:36:09.959 --> 00:36:12.727 Now, when you look at it from the Main Camera's perspective 644 00:36:15.559 --> 00:36:18.559 you can see that it fills the screen 645 00:36:18.559 --> 00:36:21.509 You can confirm that it fits perfectly 646 00:36:21.509 --> 00:36:24.599 inside the white outline of the Main Camera 647 00:36:24.599 --> 00:36:29.324 You can see that it fits perfectly like this 648 00:36:29.324 --> 00:36:32.474 Now, let's assign the material 649 00:36:32.474 --> 00:36:34.199 we want to use to this 650 00:36:34.199 --> 00:36:37.349 To assign the material, you can either 651 00:36:37.349 --> 00:36:40.449 drag and drop it into the 652 00:36:40.449 --> 00:36:42.160 Material section of the Mesh Renderer on the background 653 00:36:42.160 --> 00:36:44.460 Alternatively, you can find the Mat Background 654 00:36:44.460 --> 00:36:46.639 in the Materials folder that we've created and assign it from there 655 00:36:46.639 --> 00:36:49.733 You can also drag and drop it like this to assign it 656 00:36:49.733 --> 00:36:51.833 Alternatively, you can place it here 657 00:36:51.833 --> 00:36:53.760 or anywhere else you'd like 658 00:36:53.760 --> 00:36:56.260 If you place it conveniently, it will be applied like this 659 00:36:56.260 --> 00:37:01.213 This means the background has been successfully applied 660 00:37:01.213 --> 00:37:06.077 However, when we play 661 00:37:10.760 --> 00:37:13.510 even though the background is added 662 00:37:13.510 --> 00:37:15.060 what happens? It disappears, why? 663 00:37:15.060 --> 00:37:17.600 It disappears because it collides with the Enemy 664 00:37:17.600 --> 00:37:20.600 The reason this happens is because 665 00:37:20.600 --> 00:37:22.439 Let me pull the player a bit closer 666 00:37:22.439 --> 00:37:25.939 If you look at it this way, Let me slightly rotate it to the side 667 00:37:25.939 --> 00:37:31.014 Then, you can see that the Background is overlapping halfway 668 00:37:33.664 --> 00:37:36.714 So, they are set to collide with each other when they appear 669 00:37:36.714 --> 00:37:39.314 So, the Enemy is colliding with the Background 670 00:37:39.314 --> 00:37:41.200 That's why we have these problems 671 00:37:41.200 --> 00:37:43.700 So, should we disable the collider then? 672 00:37:43.700 --> 00:37:47.680 It would be fine, but the reason I'm working 673 00:37:47.680 --> 00:37:49.805 in the regular 3D mode 674 00:37:49.805 --> 00:37:52.155 instead of the 2D mode is 675 00:37:52.155 --> 00:37:54.239 It's exactly for this convenience 676 00:37:54.239 --> 00:37:55.607 For this convenience, how do we do it? 677 00:37:55.607 --> 00:37:59.107 Simply select the background 678 00:37:59.107 --> 00:38:03.120 and then just move it over here 679 00:38:03.120 --> 00:38:07.320 So, how does it look? The background and the player 680 00:38:07.320 --> 00:38:10.994 no longer overlap as we see it now 681 00:38:10.994 --> 00:38:15.344 So, even when the Enemy appears, it will no longer overlap in this area 682 00:38:15.344 --> 00:38:18.239 You can simply push it like this 683 00:38:18.239 --> 00:38:22.668 Now, if you place it like this and play again 684 00:38:22.680 --> 00:38:26.962 the background will remain visible, and the Enemy will appear 685 00:38:32.688 --> 00:38:36.500 Like so, we finally have a background 686 00:38:39.361 --> 00:38:44.919 So, the size and location of the Background have been fully applied 687 00:38:44.919 --> 00:38:47.169 But since this Background is static 688 00:38:47.169 --> 00:38:50.199 it seems like there's a lack of speed or movement 689 00:38:50.199 --> 00:38:53.649 So, if you select the Background and go to the right 690 00:38:53.649 --> 00:38:56.639 you can preview the material 691 00:38:56.639 --> 00:38:58.739 that we're using in here 692 00:38:58.739 --> 00:39:01.240 You can edit the Material here 693 00:39:01.240 --> 00:39:03.290 or you can also modify it 694 00:39:03.290 --> 00:39:05.520 in the material settings 695 00:39:05.520 --> 00:39:07.770 There's an option called Offset 696 00:39:07.770 --> 00:39:10.220 Let me change the Y value 697 00:39:10.220 --> 00:39:11.820 When you look at the screen 698 00:39:11.820 --> 00:39:14.880 Please check how the current screen is set up 699 00:39:14.880 --> 00:39:19.180 You can see that the screen moves when I change the Y value, right? 700 00:39:19.180 --> 00:39:21.679 It looks like the plane is constantly moving, right? 701 00:39:21.679 --> 00:39:23.579 You can create this kind of effect 702 00:39:23.579 --> 00:39:25.579 So, if you continuously 703 00:39:25.579 --> 00:39:29.160 change the Offset in the code in real time 704 00:39:29.160 --> 00:39:33.010 this part will animate, creating the feeling 705 00:39:33.010 --> 00:39:35.160 that the player is moving 706 00:39:35.160 --> 00:39:37.326 So, let's use a script to adjust 707 00:39:37.326 --> 00:39:40.119 the Offset value for it 708 00:39:40.119 --> 00:39:46.848 In the Scripts folder, click + and C# 709 00:39:46.848 --> 00:39:52.059 Let's name it Background 710 00:39:52.059 --> 00:39:53.689 As we have a background 711 00:39:53.689 --> 00:39:56.439 Let's drag and drop the script 712 00:39:56.439 --> 00:39:58.360 onto the Background GameObject 713 00:39:58.360 --> 00:40:01.960 Now, the Background has been added here 714 00:40:01.960 --> 00:40:05.231 double click 715 00:40:05.231 --> 00:40:07.381 Go to Background 716 00:40:07.381 --> 00:40:11.181 Since we need to change the Offset 717 00:40:11.181 --> 00:40:14.080 in the material it's using 718 00:40:14.080 --> 00:40:18.830 what we want to do here is scroll the background 719 00:40:18.830 --> 00:40:22.473 At that time, the necessary property is 720 00:40:22.473 --> 00:40:27.123 the Offset in the material, and it needs to be modified 721 00:40:27.123 --> 00:40:29.839 in the Material it is using, so what does it need? 722 00:40:29.839 --> 00:40:31.739 Material is the one 723 00:40:31.739 --> 00:40:34.488 Then how fast it will scroll down 724 00:40:34.488 --> 00:40:37.600 is another question 725 00:40:37.600 --> 00:40:40.100 We need the scroll speed 726 00:40:40.100 --> 00:40:42.919 We can achieve these utilizing two properties 727 00:40:42.919 --> 00:40:47.741 Let's add the material 728 00:40:47.741 --> 00:40:51.781 and then name it bgMaterial 729 00:40:51.781 --> 00:40:54.120 I will name it like this 730 00:40:54.120 --> 00:40:55.720 Background Material 731 00:40:55.720 --> 00:40:59.440 Next, let's allow the designer to modify the scroll speed by making it public 732 00:40:59.440 --> 00:41:05.720 public float and scrollSpeed We'll add this to it 733 00:41:05.720 --> 00:41:10.120 Let's set the scroll speed to around 0.2 for this 734 00:41:10.120 --> 00:41:13.020 then where do we get this Material from? 735 00:41:13.020 --> 00:41:15.760 Instead of continuously checking during runtime 736 00:41:15.760 --> 00:41:19.799 we'll make it find it once when the object is created and assign it here 737 00:41:19.840 --> 00:41:26.240 So, we need to first get the Mesh Renderer 738 00:41:26.240 --> 00:41:29.540 component attached to this object, because 739 00:41:29.540 --> 00:41:32.680 What does Mesh Renderer have on this background? 740 00:41:32.680 --> 00:41:34.780 The reason is that it holds Material 741 00:41:34.780 --> 00:41:37.119 Mesh Renderer component has Material 742 00:41:37.119 --> 00:41:40.680 So first, we need to get Mesh Renderer component 743 00:41:40.680 --> 00:41:42.525 The method we could use here is 744 00:41:42.525 --> 00:41:45.040 GetCoponent function 745 00:41:45.040 --> 00:41:48.759 You just need to add the name of the component you want to retrieve here 746 00:41:48.759 --> 00:41:52.680 So add in Mesh Renderer here 747 00:41:52.680 --> 00:41:55.440 Then the function will get Mesh Renderer 748 00:41:55.440 --> 00:41:58.390 Then we get this, which one do we render? 749 00:41:58.390 --> 00:42:00.400 It would be Material 750 00:42:00.400 --> 00:42:05.400 We can dynamically get the material we want to use 751 00:42:05.400 --> 00:42:09.519 Now, we just need to scroll the Offset 752 00:42:09.519 --> 00:42:12.839 Then, we want to gradually increase the Offset value now 753 00:42:12.839 --> 00:42:17.000 and for this, we will be utilizing the formula for uniform motion 754 00:42:17.040 --> 00:42:19.080 How about the direction? How does uniform motion work? 755 00:42:19.080 --> 00:42:22.959 P = P0 + vt 756 00:42:22.959 --> 00:42:26.639 v means velocity that we need 757 00:42:26.639 --> 00:42:27.919 It's the vector 758 00:42:27.919 --> 00:42:31.219 To offset with this formula 759 00:42:31.219 --> 00:42:35.304 First, we need direction 760 00:42:35.304 --> 00:42:36.919 What's the second? 761 00:42:36.919 --> 00:42:37.807 simply make it move 762 00:42:37.807 --> 00:42:39.680 Scroll eventually means to move 763 00:42:39.680 --> 00:42:43.879 Because we scroll, move it in a given direction 764 00:42:43.879 --> 00:42:46.080 So, let's state the direction 765 00:42:46.160 --> 00:42:51.160 If you look at vector, there are only X and Y value 766 00:42:51.160 --> 00:42:53.199 For offset, right? 767 00:42:53.199 --> 00:42:57.320 Since this texture is an image, the image has no depth 768 00:42:57.320 --> 00:42:59.820 Of course there are 3D textures 769 00:42:59.820 --> 00:43:01.479 but this one uses a texture without depth 770 00:43:01.479 --> 00:43:05.080 That's why it is using X and Y 771 00:43:05.080 --> 00:43:10.559 So for this one, we use vector 2 instead of 3 772 00:43:10.559 --> 00:43:12.720 For direction, simply put direction 773 00:43:12.720 --> 00:43:16.520 Now, vector 2 toward where? 774 00:43:16.520 --> 00:43:17.679 up 775 00:43:17.679 --> 00:43:19.600 value needs to increase 776 00:43:19.600 --> 00:43:24.787 For scroll, we use the formula stated earlier 777 00:43:24.787 --> 00:43:27.759 which exist in bgMaterial 778 00:43:27.759 --> 00:43:31.800 bgMaterial, why don't you give me your texture Offset 779 00:43:31.800 --> 00:43:33.450 MainTexture's offset 780 00:43:33.450 --> 00:43:35.720 What we want to do is to change Offset value 781 00:43:35.720 --> 00:43:38.440 This directly become P 782 00:43:38.440 --> 00:43:41.872 How do we make adding happen? P0 + vt 783 00:43:41.872 --> 00:43:46.839 v equals direction * scrollSpeed 784 00:43:46.839 --> 00:43:48.320 that gives us v 785 00:43:48.320 --> 00:43:52.039 and then, put Time.deltaTime 786 00:43:52.039 --> 00:43:59.440 P = P0+, this value means v 787 00:43:59.440 --> 00:44:03.600 this one should be t 788 00:44:03.600 --> 00:44:06.759 Like this, we've made a scroll 789 00:44:06.759 --> 00:44:08.479 Save it 790 00:44:08.479 --> 00:44:12.880 And then play this 791 00:44:12.880 --> 00:44:14.720 We now see that it scrolls 792 00:44:14.720 --> 00:44:17.072 Now the game looks more like it 793 00:44:17.072 --> 00:44:18.924 with higher level of completeness 794 00:44:22.250 --> 00:44:26.150 Now, let's add the sound effects 795 00:44:26.150 --> 00:44:28.679 as the final step 796 00:44:28.679 --> 00:44:30.440 Go to the Asset Store 797 00:44:30.440 --> 00:44:37.800 Let's first download the Weapon Sound Pack from the Asset Store 798 00:44:37.800 --> 00:44:41.800 Search for Weapon Soldier Sounds Pack in the Asset Store 799 00:44:41.800 --> 00:44:47.679 Here, you'll see various gun related sound effects available 800 00:44:47.679 --> 00:44:49.960 Let's click this one 801 00:44:49.960 --> 00:44:51.559 Weapon Soldier Sounds Pack 802 00:44:51.559 --> 00:44:56.479 Open it in Unity 803 00:44:56.479 --> 00:45:01.639 You can download it from the Package Manager here 804 00:45:01.639 --> 00:45:04.199 Once the download is complete, click the Import button 805 00:45:04.199 --> 00:45:10.559 Let's import it into our project 806 00:45:10.559 --> 00:45:15.359 It has been added to the project, and now let's import another one 807 00:45:15.359 --> 00:45:19.959 This time, we will also import the explosion effects 808 00:45:19.959 --> 00:45:25.720 Let's search for Grenade Sound FX now 809 00:45:25.720 --> 00:45:26.839 This one is Free 810 00:45:26.839 --> 00:45:28.640 Grenade Sound FX 811 00:45:28.640 --> 00:45:33.519 Click this one 812 00:45:33.519 --> 00:45:35.469 Also, open in Unity 813 00:45:35.469 --> 00:45:39.720 Download it from the Package Manager 814 00:45:39.720 --> 00:45:47.600 Also import project to add it to our project 815 00:45:47.600 --> 00:45:50.640 So, for the bullet sound, it should play something like 816 00:45:50.640 --> 00:45:52.959 bang! or pow! when the bullet is fired 817 00:45:52.959 --> 00:45:59.399 So, let's add the sound to the bullet prefab 818 00:45:59.399 --> 00:46:03.006 We'll set it up like this so that the bullet prefab 819 00:46:03.006 --> 00:46:04.679 can play the sound 820 00:46:04.679 --> 00:46:07.436 Let's choose which sound 821 00:46:07.436 --> 00:46:09.320 we will use for the bullet 822 00:46:09.320 --> 00:46:12.440 Now, open the Mental Dream asset 823 00:46:12.440 --> 00:46:14.279 and you'll see the Soldier Sounds Pack 824 00:46:14.279 --> 00:46:18.359 From there, let's take 825 00:46:18.359 --> 00:46:20.920 the Fire sound and use it 826 00:46:20.920 --> 00:46:24.519 So, select the bullet in the Prefab folder 827 00:46:24.519 --> 00:46:26.819 then drag and drop the Fire sound 828 00:46:26.819 --> 00:46:30.279 from the Soldier Sounds Pack like this 829 00:46:30.279 --> 00:46:33.160 Then, the AudioSource component 830 00:46:33.160 --> 00:46:34.160 which will allow us to control the sound 831 00:46:34.160 --> 00:46:36.640 will be automatically added 832 00:46:36.640 --> 00:46:40.000 and the AudioClip will be set to "Fire 833 00:46:40.000 --> 00:46:43.519 This will do for us 834 00:46:43.519 --> 00:46:45.040 Let's go and play 835 00:46:45.040 --> 00:46:50.320 Let's see how it's implemented 836 00:46:50.320 --> 00:46:52.820 The sound of firing bullets 837 00:46:52.820 --> 00:46:56.000 is implemented very easily 838 00:46:56.000 --> 00:46:57.950 For the explosion effect 839 00:46:57.950 --> 00:46:59.920 you can play a boom sound when there's explosion 840 00:46:59.920 --> 00:47:02.870 Now, let's go to the explosion effect 841 00:47:02.870 --> 00:47:04.320 and work on adding the sound there as well 842 00:47:04.320 --> 00:47:06.359 Since it might be hard to find the explosion effect directly 843 00:47:06.359 --> 00:47:09.079 select this one at the Prefab 844 00:47:09.079 --> 00:47:10.480 and then choose the Enemy 845 00:47:10.480 --> 00:47:14.330 In the Enemy, you can find the part registered in the Explosion Factory 846 00:47:14.330 --> 00:47:16.352 where the explosion effect is located 847 00:47:16.359 --> 00:47:19.159 By clicking on it here, you can jump directly 848 00:47:19.159 --> 00:47:20.640 to where it's located 849 00:47:20.640 --> 00:47:21.990 Like this, you can jump directly 850 00:47:21.990 --> 00:47:25.640 to the location of this Prefab 851 00:47:25.640 --> 00:47:27.720 So, let's select this 852 00:47:27.720 --> 00:47:32.720 We can simply drag and drop it here 853 00:47:32.720 --> 00:47:34.040 To this explosion effect 854 00:47:34.040 --> 00:47:38.200 Let's register the asset we want to use here 855 00:47:38.200 --> 00:47:39.320 Since this is explosion effect 856 00:47:39.320 --> 00:47:42.119 If you open the Grenade Sound FX 857 00:47:42.119 --> 00:47:43.839 you'll see the grenade sound listed there 858 00:47:43.839 --> 00:47:46.119 This one, grenade 859 00:47:46.119 --> 00:47:49.880 Among these, if we grab the one that says Grenade 5 Shots 860 00:47:49.880 --> 00:47:53.040 and drag and drop it here 861 00:47:53.040 --> 00:47:55.200 Then it will be registered like this 862 00:47:55.200 --> 00:47:56.920 Shall we play again? 863 00:47:56.920 --> 00:48:00.559 Since it has been applied to the original Prefab file 864 00:48:00.559 --> 00:48:03.320 if you play 865 00:48:03.320 --> 00:48:05.000 How is it? 866 00:48:05.000 --> 00:48:07.799 By simply moving with our cube 867 00:48:07.799 --> 00:48:10.040 then assigning the player, enemy, bullets, background 868 00:48:10.040 --> 00:48:12.760 and finally the sound were added into 869 00:48:12.760 --> 00:48:14.679 doesn't the completeness increase suddenly? 870 00:48:14.679 --> 00:48:20.200 We've added the explosion effect 871 00:48:20.200 --> 00:48:24.320 If you want to add background sound to finish it off 872 00:48:24.320 --> 00:48:27.670 For the background sound, it would be good for you 873 00:48:27.670 --> 00:48:30.000 to find data that matches the feeling you're going for 874 00:48:30.000 --> 00:48:34.959 In my case, I searched for metal under SS2 875 00:48:34.959 --> 00:48:40.320 And then I found something like Eternity Djent Metal Scfi Horror Music Pack here 876 00:48:40.320 --> 00:48:45.040 Select the Free version 877 00:48:46.200 --> 00:48:48.720 I downloaded it from Unity 878 00:48:48.720 --> 00:48:51.359 So, download it 879 00:48:51.359 --> 00:48:54.480 When download is complete, import it 880 00:48:54.480 --> 00:48:57.600 You could download them all but there are too many data 881 00:48:57.600 --> 00:49:02.160 I will select this number 6, named loop 882 00:49:02.160 --> 00:49:06.880 and Import this one to our project 883 00:49:06.880 --> 00:49:07.920 worked right? 884 00:49:07.959 --> 00:49:11.279 Then, let's register this and try using it in our project 885 00:49:11.279 --> 00:49:14.279 It seems like you want to add the background sound 886 00:49:14.279 --> 00:49:17.324 by dragging and dropping it into the background 887 00:49:17.324 --> 00:49:19.074 So where is it? 888 00:49:19.074 --> 00:49:23.119 If you open the Audio assets, you'll see the music 889 00:49:23.119 --> 00:49:25.269 In this folder, you'll find the one we've added 890 00:49:25.269 --> 00:49:26.400 Right over here 891 00:49:26.400 --> 00:49:29.760 Drag and drop this file to add it 892 00:49:35.871 --> 00:49:39.921 Then, this background sound for the title will play 893 00:49:39.921 --> 00:49:41.559 continuously in an infinite loop 894 00:49:41.559 --> 00:49:44.960 Finally, if you play it 895 00:50:00.761 --> 00:50:02.911 you'll have created a plane game 896 00:50:02.911 --> 00:50:05.200 with the metal sound as the background music 897 00:50:05.200 --> 00:50:07.050 You can change musics 898 00:50:07.050 --> 00:50:09.320 according to your preferences 899 00:50:09.320 --> 00:50:14.239 With that, we've completed applying all the sounds 900 00:50:14.239 --> 00:50:17.440 Let's summarize the content we've learned in this lesson 901 00:50:17.440 --> 00:50:20.740 First, we upgraded the player, enemy 902 00:50:20.740 --> 00:50:23.640 and bullets to the alpha version 903 00:50:23.640 --> 00:50:27.140 We learned how to use the Asset Store for this purpose 904 00:50:27.140 --> 00:50:30.200 and also how to modify Prefabs 905 00:50:30.200 --> 00:50:35.119 Next, we learned how to implement explosion effects and play sounds 906 00:50:35.119 --> 00:50:36.869 By adding these effects 907 00:50:36.869 --> 00:50:40.559 we saw how they contribute to creating a more immersive game 908 00:50:40.559 --> 00:50:45.209 We also created a background and implemented 909 00:50:45.209 --> 00:50:47.520 scrolling by adjusting the material's offset 910 00:50:47.520 --> 00:50:49.396 That's it for this lesson 911 00:50:50.137 --> 00:50:50.637 Alpha version upgrade of the player, enemy, and bullets Alpha version upgrade of the player Replace the player's appearance with the actual modeling d 912 00:50:50.637 --> 00:50:51.137 From the Asset Store, downloaded and added Awesome Cartoon Airplanes Drag and drop Plane1 from the Prefab folder and set it as a child of the Player 913 00:50:51.137 --> 00:50:51.637 Select Plane1 under the Player, set the values of the Transform component Remove the Mesh Renderer and Mesh Filter components rendering the appearance 914 00:50:51.637 --> 00:50:52.137 Alpha version upgrade of the enemy Replace the enemy's appearance with the actual modeling data used 915 00:50:52.137 --> 00:50:52.637 Use the Plane2 Prefab from the AwesomeCartoonAirplanes of Prefabs folder for the enemy 916 00:50:52.637 --> 00:50:53.137 Select the Plane2 Prefab from the Assets to AwesomeCartoonAirplanes to Prefabs, follow this path in the Project window 917 00:50:53.137 --> 00:50:53.637 Drag Plane2 Prefabs and set it as a child of Enemy of Hierarchy Remove Mesh Filter and Mesh Renderer component of Enemy and Plane2 918 00:50:53.637 --> 00:50:54.384 To exit editing the Enemy Prefab and return to the scene, select the Back button in the Hierarchy 919 00:50:54.384 --> 00:50:55.234 Alpha version upgrade of the bullet Replace the bullet's appearance with the actual modeling data used 920 00:50:55.234 --> 00:50:56.084 Search for Rockets, Missiles and Bombs, Cartoon Low Poly Pack in the Asset Store, download it, and add it to the project 921 00:50:56.084 --> 00:50:56.834 Double click the Bullet Prefab in the Assets Project window to open the Prefab editing window 922 00:50:56.834 --> 00:50:57.584 Set Rocket 08 Yellow Asset as a child of Bullet Select the Rocket 08 Yellow, and then change the Scale values in the Transform component 923 00:50:57.584 --> 00:50:58.304 Remove the Mesh Filter and Mesh Renderer components from the Bullet game object Adjust Transform value and Boxcollider component value 924 00:50:58.304 --> 00:50:59.104 Adding Explosion effect Add explosion effect when objects collide Search for Cartoon FX Free from the Asset Store, download and add it to project 925 00:50:59.104 --> 00:50:59.954 Enable collision between Enemy and Player, and Enemy and Bullet, but disable collision between Player and Bullet Add explosion prefab property in Enem 926 00:50:59.954 --> 00:51:00.804 Double click the Enemy Prefab in Assets Prefabs folder in project window open the Prefab editing window then add CFXR Explosion Smoke 2 Solo 927 00:51:00.804 --> 00:51:01.554 Use HDR Assign the CFXR Explosion Smoke 2 Solo HDR Prefab to the Explosion Factory property 928 00:51:01.554 --> 00:51:02.343 In Enemy.cs, create an explosion effect when the Enemy collides with another object and assign the explosion effect's position to the Enemy position 929 00:51:02.343 --> 00:51:02.843 Adding background and play sound' Adding Scroll background From the Asset Store, search for Space Star Field Backgrounds and download to import 930 00:51:02.843 --> 00:51:03.343 Create a folder in the Project window and rename it to Materials In the Materials folder, click the plus button, select Material, 931 00:51:03.343 --> 00:51:03.843 and then rename it to Mat Background Select the Mat Background material and switch to the Inspector window to modify its properties 932 00:51:03.843 --> 00:51:04.343 Then, assign SingleNeb 07 to the Albedo property In Hierarchy, create Quad and rename it to Background relocate Mat Background Material 933 00:51:04.343 --> 00:51:04.843 So it doesn't overlap with Player after assigning Background gameObject's Mesh Renderer Component Materials property 934 00:51:04.843 --> 00:51:05.343 Create a Background.cs file in the Scripts folder and then assign it to the Background game object In Background.cs, the necessary properties are Mate 935 00:51:05.343 --> 00:51:05.782 Declare the two properties Assign Mat Background to Bg Material property For direction, Material Offset propert value is in the form of Vector 2 936 00:51:05.782 --> 00:51:06.247 Implement it as Vector2.up The scroll is implemented using the motion equation P equals P0 plus vt on the mainTextureOffset property 937 00:51:06.247 --> 00:51:06.747 Adding bullet sound From the Asset Store, search for Weapon Soldier Sounds pack and download to import In the Assets of Prefabs folder 938 00:51:06.747 --> 00:51:07.247 Double click on Bullet to move to prefabs editing window drag and drop Fire sound from SoldierSoudnsPack Folder into Bullet Prefabs component 939 00:51:07.247 --> 00:51:07.747 Adding explosion sound From the Asset Store, search for Grenade Sound FX and download to import CFXR Explosion Smoke 2 Solo HDR 940 00:51:07.747 --> 00:51:08.247 Double click the explosion effect to open the Prefab editing window Add AudioSource Component to CFXR Explosion Smoke 2 Solo HDR object 941 00:51:08.247 --> 00:51:08.747 Assign Grenade5Short file of Grenade folder to AudioClip adding BGM 942 00:51:08.747 --> 00:51:09.247 From the Asset Store, search for Eternity Djent/Metal-Scfi-Horror Music Pack and download only the 06 God of darkness to import 943 00:51:09.247 --> 00:51:10.146 Assign the Audio BGM clip to the AudioSource of the Background object, and then add 06 God of Darkness