public static bool inventoryPause, pause; // playPause za inventory pauzira, pause pauzira za pause menu // Use this for initialization IEnumerator Start() { // ako ne radi obrisi speed = 12; playerSpotlight = GameObject.Find("PlayerSpotlight"); targetSpotlight = GameObject.Find("DestinationSpotlight"); eog = false; // pronadji listu zvukova sounds = GameObject.Find("MusicContainer").GetComponents <AudioSource>(); pause = false; inventoryPause = false; animator = GetComponent <Animator>(); //animator.SetBool("Run", true); GameObject inventory = GameObject.Find("Inventory"); ic = inventory.GetComponent <InventoryController>(); // inicijalizacija koja je potrebna zbog menua goBack = false; popAgain = true; visitedTarget = new Stack <Item>(); // kraj inicijalizacije prouzrokovane menuom target = SpawnPlayer.getVisitedList(); /*print("target.Count-> " + target.Count); * for (int kk = 0; kk < target.Count; kk++) * print("target[" + kk + "]->" + target[kk].Num);*/ //yield return new WaitForSeconds(1); yield return(new WaitUntil(() => target != null)); target = SpawnPlayer.getVisitedList(); animator.SetBool("Run", true); // run animacija krece tek kada player ima cilj ka kome ide //print("target.Count-> " + target.Count); /* for (int kk = 0; kk < target.Count; kk++) * { * print("target[" + kk + "]->" + target[kk].Num); * print("target[" + kk + "] tip->" + target[kk].ItemObject.GetType() + " name->" + target[kk].ItemObject.name); * }*/ }