Open in app
Home
Notifications
Lists
Stories

Write
Pete Thomasberger
Pete Thomasberger

Home

Aug 8, 2021

Dev Day 74: Animating Movement in Unity3D

Objective: Add movement animations to the Player when pressing either the left or right arrows. — Objective: Add movement animations to the Player when pressing either the left or right arrows. Step 1: In Unity, with the Player GameObject selected in the Hierarchy window, create an animation file for the left turn and another animation file for the right turn using the chopped-up Sprite animation images…

Unity

4 min read

Dev Day 74: Animating Movement in Unity3D
Dev Day 74: Animating Movement in Unity3D

Aug 6, 2021

Dev Day 73: Working with Weighted Tables in Unity3D

Objective: Create a balanced spawn system for the power-ups using a weighted table where more common power-ups, like ammo and health, spawn… — Objective: Create a balanced spawn system for the power-ups using a weighted table where more common power-ups, like ammo and health, spawn more frequently, and rare power-ups, like the Laser Beam, spawn more infrequently. Step 1: In the SpawnManager script, create a private int array called _table and set a…

Unity

4 min read

Dev Day 73: Working with Weighted Tables in Unity3D
Dev Day 73: Working with Weighted Tables in Unity3D

Aug 1, 2021

Dev Day 72: Class Inheritance in Unity3D

Objective: Create two custom classes and have one custom class inherit the properties of the other custom class. — Objective: Create two custom classes and have one custom class inherit the properties of the other custom class. Step 1: In Unity, within the Hierarchy window, create an Empty GameObject named Item_Database. In the Project window, create three C# Scripts called Item, Weapon, and ItemDatabase. …

Unity

2 min read

Dev Day 72: Class Inheritance in Unity3D
Dev Day 72: Class Inheritance in Unity3D

Jul 30, 2021

Dev Day 71: Using Custom Classes within Databases in Unity3D

Objective: Create a custom Class for defining information about 3 customers to use within a customer database. — Objective: Create a custom Class for defining information about 3 customers to use within a customer database. Step 1: In Unity, create an Empty GameObject in the Hierarchy window called Customer_Database. Then create a C# Script called CustomerDatabase and drag it onto the Customer_Database GameObject. …

Unity

3 min read

Dev Day 71: Using Custom Classes within Databases in Unity3D
Dev Day 71: Using Custom Classes within Databases in Unity3D

Jul 29, 2021

Dev Day 70: Working with Return Methods and Arrays in Unity3D

Objective: Create 5 positions that a GameObject will be randomly set to at the start of the game. — Objective: Create 5 positions that a GameObject will be randomly set to at the start of the game. Step 1: Within Unity, create a Cube 3D GameObject in the Hierarchy window and rename it to Player. …

Unity

3 min read

Dev Day 70: Working with Return Methods and Arrays in Unity3D
Dev Day 70: Working with Return Methods and Arrays in Unity3D

Jul 26, 2021

Dev Day 69: Working with Return Methods in Unity3D

Objective: When pressing the space bar, damage the Player by a random amount and, using a Return Method, check if the Player has died. If… — Objective: When pressing the space bar, damage the Player by a random amount and, using a Return Method, check if the Player has died. If the Player has died, print out “The Player has died!”, …

Unity

3 min read

Dev Day 69: Working with Return Methods in Unity3D
Dev Day 69: Working with Return Methods in Unity3D

Jul 24, 2021

Dev Day 68: Working With Method Parameters in Unity3D

Objective: Change the color of a cube to red when the Space key is pressed by passing parameters from one method to another method. — Objective: Change the color of a cube to red when the Space key is pressed by passing parameters from one method to another method. Step 1: In Unity, create a 3D Cube in the Hierarchy window.

Unity

3 min read

Dev Day 68: Working With Method Parameters in Unity3D
Dev Day 68: Working With Method Parameters in Unity3D

Jul 19, 2021

Dev Day 67: Fixing A GameObject Detection Bug in Unity3D

Objective: Fix a bug that causes the Enemy to detect and evade laser shots after a collision that triggers the explosion animation. — Objective: Fix a bug that causes the Enemy to detect and evade laser shots after a collision that triggers the explosion animation. Step 1: In the Enemy script, within the DodgeLeft() coroutine, add to the while loop condition that both _collider1 and _collider2 must be enabled for the evade movement to take place.

Unity

2 min read

Dev Day 67: Fixing A GameObject Detection Bug in Unity3D
Dev Day 67: Fixing A GameObject Detection Bug in Unity3D

Dev Day 67: Fixing A GameObject Detection Bug in Unity3D

Objective: Fix a bug that causes the Enemy to detect and evade laser shots after a collision that triggers the explosion animation.

Step 1: In the Enemy script, within the DodgeLeft() coroutine, add to the while loop condition that both _collider1 and _collider2 must be enabled for the evade movement to take place.

--

--


Jul 17, 2021

Dev Day 66: Using Lerp-Over-Time to Evade Shots in Unity3D

Objective: When the Enemy detects a laser, depending on which Raycast picks up the detection, the Enemy will move to the left or right to… — Objective: When the Enemy detects a laser, depending on which Raycast picks up the detection, the Enemy will move to the left or right to evade the laser. Step 1: Create an IEnumerator method called DodgeLeft(). Within this method create a Vector2 variable called _currentPos and have it equal to…

Unity

2 min read

Dev Day 66: Using Lerp-Over-Time to Evade Shots in Unity3D
Dev Day 66: Using Lerp-Over-Time to Evade Shots in Unity3D

Jul 16, 2021

Dev Day 65: Using Raycast To Detect GameObjects in Unity3D

Objective: Enemies that move straight down the Y-axis can detect laser shots made by the player. — Objective: Enemies that move straight down the Y-axis can detect laser shots made by the player. Step 1: In Unity, select the Laser Prefab in the Project window and create a new Layer in the Inspector window called Laser.

Unity

3 min read

Dev Day 65: Using Raycast To Detect GameObjects in Unity3D
Dev Day 65: Using Raycast To Detect GameObjects in Unity3D
Pete Thomasberger

Pete Thomasberger

Unity Developer

Following
  • Jared Amlin

    Jared Amlin

  • Al Heck

    Al Heck

  • Calum Slee

    Calum Slee

  • Bill Rislov

    Bill Rislov

  • Micha Davis

    Micha Davis

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable