Ejemplo n.º 1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.name == "Player")
     {
         StoreLocation.StorePlayerLocation();
         Debug.Log(GameInformation.PreviousScene);
         Debug.Log(GameInformation.PlayerLocation);
         SceneManager.LoadScene("battle");
         //thePlayer.startPoint = exitPoint;
         //Debug.Log (thePlayer.startPoint);
         //Debug.Log (exitPoint);
         //Debug.Log ("Changed Scenes!" + levelToLoad);
     }
 }
Ejemplo n.º 2
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (other.gameObject.name == "Player")
        {
            SceneManager.LoadScene(sceneName);
            StoreLocation.StorePlayerLocation();
            Debug.Log("Colliding");
            other.transform.position = new Vector3(xPosition, yPosition, 0);
        }

//		if(other.gameObject.name == "Main Camera") {
//			Debug.Log ("Colliding");
//			other.transform.position = new Vector3(xPosition, yPosition, 0);
//			SceneManager.LoadScene(sceneName);
//		}
    }