We got this far. We might as well try to kill Ethan (haha!). Here are the specifications for this new feature:
This time, we'll attach the script to a new empty GameController
object by performing the following steps:
Create an empty game object and name it
GameController
.Attach a new C# script to it, using Add Component, named
KillTarget
.Open the script in MonoDevelop.
Here's the completed KillTarget.cs
script:
using UnityEngine; using System.Collections; public class KillTarget : MonoBehaviour { public GameObject target; public ParticleSystem hitEffect; public GameObject killEffect; public float timeToSelect = 3.0f; public int score; private float countDown; void Start () { score = 0; countDown...