Пример #1
0
 void UseItem()
 {
     if (_sceneController.IsOnAdventureScene() && EnterOrLeaveDungeon.CanPlayerChangeScene())
     {
         _sceneController.SetNewScene();
         _spawnController.SetUpNewRespawn();
         _spawnController.SpawnToHiddenScene();
     }
     else if (_sceneController.IsOnHiddenObjectsScene() && EnterOrLeaveDungeon.CanPlayerChangeScene())
     {
         _spawnController.SpawnToAdventure();
         StartCoroutine(_spawnController.DeactivateSpawn());
         StartCoroutine(_sceneController.UnloadScene());
     }
     else if (_sceneController.IsOnAdventureScene() && EndCurrentLevelBehaviour.CanPlayerEndScene())
     {
         EndLevelUI.EnableEndMenu();
     }
     else if (_sceneController.IsOnAdventureScene() && AllowToPickUpItem.AllowToPickUp())
     {
         _inventoryDesign.AddToInventory();
     }
     else if (_sceneController.IsOnAdventureScene())
     {
         Debug.Log("Use item");
     }
 }
 public void OnMozartHeroBtnClick()
 {
     if (EndCurrentLevelBehaviour.CanPlayerEndScene())
     {
         SceneManager.LoadSceneAsync(mozartHeroName, LoadSceneMode.Single);
     }
 }