private void OnTriggerEnter(Collider other) { if (other.tag == "Player") { DoorFrameManager.GetInstance().NewLevel(nextLevel); Debug.Log(nextLevel); } }
private void Start() { frameManager = DoorFrameManager.GetInstance(); musicManager = AudioManager.GetInstance().musicManager; player = AudioManager.GetInstance().player; Debug.Log(player); Tplayer = player.transform; dotPortals = Vector3.Dot(Tplayer.transform.forward, tpPoint.transform.forward); }
void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(this); Debug.Log("2 instances of DoorFrameManager detected. Destroying script at " + this.gameObject.name); return; } levelsCompleted = 0; }