Running Everything — Unity Game 3
Scripts & Running — Episode #03
Step#01 — Go to my Google Drive and download all the scripts at once;
Step#02 — Paste inside folder Scripts all files there;
Step#03 — Let’s distribute each function; (1) First Drag BGScroller to each AmazonForest; Set (2) Scroll Speed=-5 and Tile Size Z= 1090; Repeat this to all AmazonForest objects (note we set (3) Shader = unlit/Texture to all images ;)
Step#04 —Now run the game and you will see the images rolling on the screen; photos of the Amazon River invite you to visit Manaus — AM;
Step#05 — Now select DrugDealer, Add GameController script to it, drag it until the p47 image disappear from the screen, set:
Spawn Positon Values : x=0, y=1; z=40
Spawn Rotation Values: x=-90; y=0; z=0; w=90
DDAirPlane Drag p47_scheme1 to it
Spawn Wait = 4
Start Wait = 1
Wave Wait = 10
DD Air Plane Count = 3
Speed =8
Desable Gravity (6)
Step#06 — Add Capsule Collider component to p47_scheme1; click Edit Collider:
Center : x=0, y=-.6; z=2.5
Radius: 0.85
Height = 3.55
Direction = y-axis
Step#07 — Attach DestroyByBoundary script to Boundary object;
Step#08 —Add Rigidbody and Capsule collider to Super Tucano; Set:
Rigidbody :
Desable Use GravityCapsule Collider :
Center :x=0; y=1.36; z=0
Radius: 1.33
Height = 11.79
Direction : Z-axis
Step#09— Head over Asset Store again to import enemy and player explosions particles system; (1) Click Asset Store tab; (2) click import Space Shooter Tutorial; (4) deselect all and (3)choose explosion enemy-prefab and explosion player-prefab (5)click import;
Step#10 — Return to DrugDealer and Tag it as GameController;
Step#11— Select p47_scheme1 and add DestroyByContact script and drag to its slots each object shown below:
Step#12 — On Project tab select Prefabs > explosion_enemy, Click Add Component buttom and Add Audio Source, drag explosion_enemy to AudioClip slot;
Step#13 — Let’s make Missiles: Create an Empty object, (1) rename it to Missile; Create inside it 3d Object > Quad, (2) rename it to Bomb0, reset it; y=0.4;
Now Add Components: (3) Rigidbody; (4) Mover Scripts (Speed = 50) and (5) Capsule Collider, click Edit Collider:
Center : x=0; y=0.11; z=1.78
Radius: 0.1
Height = 1.85
Direction = Z-axis
Step#14 — Open Material folder and Drag n’ drop fx_bolt_orange inside Bomb0; This will add a particle representing each missile;
Step#15 — Create more 2 bombs and locate it below the SuperTucano; repeat the previous procedure;
Step#16 — Now drag the Missile to Prefabs and delete it from scene_01;
Step#17 — There you have it! Congrats!
The only modification required was the color of the texts for the re-start and score panel. That’s all. Run the game and slowly go to understanding the code. So I understand that we learn faster in this fashion...see something working to understand the code as it plays the music!
BTW, music? tip: see my drive…add AudioSource to EMB_314_Super_Tucano and drag weapon_player to it (disable Play On Awake); add another one and drag Tucanos_motor — enable Play On Awake;
Select DrugDealer, add AudioSource and drag Suspense String. Take care!
Thank you!
Bye!
Download Images/Scripts from MyGoogleDrive now!
Index:
Post # 00 — EMBRAER Super Tucano VS A-10 Thunderbolt II
Post # 01 — Preparing Scenario — Unity Game 1
Post # 02 — Lighting System & More — Unity Game 2
Post # 03 — Running Everything — Unity Game 3
References & Credits
Unity version 2017.3.1f1