Noob question,
I was wondering how to combine a pause game with an OnTriggerEnter2D command. The idea is when the player reaches the end of the level, they enter the trigger, the game pauses and the winning screen pops up.
So far I have this below but am trying to figure how to incorporate this Unity - Scripting API: EditorApplication.isPaused
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EndTrigger : MonoBehaviour {
public GameManager gameManager;
void OnTriggerEnter2D ()
{
gameManager.CompleteLevel(); //sends to winning screen script
}
}
Thanks!
CP