コード例 #1
0
ファイル: FastTravel.cs プロジェクト: manryan/portfoliocode
 public void travel(locationsData data)
 {
     GameManager.instance.player.saveEverythingExceptEnemies();
     id.instance.fastTravelling = true;
     id.instance.x  = data.position.x;
     id.instance.y  = data.position.y;
     Time.timeScale = 1;
     SceneManager.LoadScene(data.sceneName);
 }
コード例 #2
0
ファイル: FastTravel.cs プロジェクト: manryan/portfoliocode
 public void checkIfWeTravel(locationsData data)
 {
     if (data.location == PoolLocation)
     {
         //  Debug.Log(data.location);
         //  Debug.Log("already here");
         declinedText.text = "Can't travel to" + PoolLocation + "as you already are at " + PoolLocation;
         declinedPanel.SetActive(true);
     }
     else
     {
         PoolLocation          = data.location;
         confirmationText.text = "Are you sure you want to travel to " + PoolLocation + "?";
         confirmButton.onClick.RemoveAllListeners();
         confirmButton.onClick.AddListener(delegate { travel(data); });
         confirmationPanel.SetActive(true);
     }
 }