UNITY GAME DEVELOPMENT Creating a Top Down Shooter

  • Slides: 14
Download presentation
UNITY GAME DEVELOPMENT Creating a Top Down Shooter

UNITY GAME DEVELOPMENT Creating a Top Down Shooter

CLASS OVERVIEW Class 1 Revision Parenting objects in Hierarchy 2 D Movement 3 D

CLASS OVERVIEW Class 1 Revision Parenting objects in Hierarchy 2 D Movement 3 D Movement Character Rotation to Mouse Position Prefabs (Bullets, Ammo Crates) Shooting & Spawning Bullets Canvas UI Targets! Applying Textures to Materials Advanced: Weapon Equipment Advanced: New Weapons

REVISION Lighting C#: Variables, Functions & Code grouping Creating & adding scripts to Game.

REVISION Lighting C#: Variables, Functions & Code grouping Creating & adding scripts to Game. Objects Time. delta. Time Rigidbody Character. Controller Input Jumping Logics Audio & Importing Assets

PARENTING OBJECTS IN HIERARCHY Drag Game. Object onto other Game. Object Creates hierarchy Moving,

PARENTING OBJECTS IN HIERARCHY Drag Game. Object onto other Game. Object Creates hierarchy Moving, rotating, scaling parent object affects child objects

2 D MOVEMENT 3 D MOVEMENT Horizontal input used as Movement in X axis

2 D MOVEMENT 3 D MOVEMENT Horizontal input used as Movement in X axis Vertical input used as Movement in Z axis

CHARACTER ROTATION TO MOUSE POSITION 1. Detect Mouse Position in Screen Space 2. Convert

CHARACTER ROTATION TO MOUSE POSITION 1. Detect Mouse Position in Screen Space 2. Convert Player’s World Position to Screen Space 3. Subtract Player Screen Space Position from Mouse Screen Space Position 4. Use Mathematics to get Angle from Vector (Atan) 5. Apply Angle Rotation to Player

PREFABS (BULLETS, AMMO CRATES) Dragging Game. Objects from Scene to Prefabs folder creates a

PREFABS (BULLETS, AMMO CRATES) Dragging Game. Objects from Scene to Prefabs folder creates a Prefabs are displayed in Blue in Scene Hierarchy Prefabs share attributes!

SHOOTING & SPAWNING BULLETS 1. Check Ammo 2. Check Cooldown 3. Spawn Bullet 4.

SHOOTING & SPAWNING BULLETS 1. Check Ammo 2. Check Cooldown 3. Spawn Bullet 4. Update Ammo & UI

CANVAS UI Use Canvas System to add UI elements on screen Display Bullet Ammo

CANVAS UI Use Canvas System to add UI elements on screen Display Bullet Ammo in Text

TARGETS! Add some Targets and Destroy them on Impact. Turn the Bullet’s Collider into

TARGETS! Add some Targets and Destroy them on Impact. Turn the Bullet’s Collider into a Trigger Implement On. Trigger. Enter on the Target. Add a Tag to Bullet called “Bullet” Check for this Tag in On. Trigger. Enter

APPLYING TEXTURES TO MATERIALS Create Material Click on small circle left of Albedo Select

APPLYING TEXTURES TO MATERIALS Create Material Click on small circle left of Albedo Select Texture Setup Tiling X and Tiling Y if needed

ADVANCED: WEAPON EQUIPMENT Try and make the character Equip a Weapon by Picking it

ADVANCED: WEAPON EQUIPMENT Try and make the character Equip a Weapon by Picking it up by pressing a button. Make the character able to Equip and Unequip a Weapon.

ADVANCED: NEW WEAPONS Add a New Weapon like a Machine Gun, Shotgun and /

ADVANCED: NEW WEAPONS Add a New Weapon like a Machine Gun, Shotgun and / or Rocket Launcher? !

Q&A Do you have any questions related to the topics mentioned?

Q&A Do you have any questions related to the topics mentioned?