/// <summary> /// OnTriggerEnter is called when the Collider other enters the trigger. /// </summary> /// <param name="other">The other Collider involved in this collision.</param> void OnTriggerEnter(Collider other) { // check for player entry if (other.tag != "Player") { return; } // disable to avoid multiple calls enabled = false; // delete old floor and generate a new one TargetGenerator.NextFloor(); }