void Update() { dataHandler = GameObject.Find("DataHandler"); inventory ino = dataHandler.GetComponent <inventory>(); dicForCompare = ino.dic; /********************************************************/ targetPlayer = GameObject.Find("_3rd Person Controller"); pp = targetPlayer.GetComponent <PickingAndPlacing>(); /********************************************************/ if (pp.gotMessage != null) { gotMessage = pp.gotMessage; //here we are getting destMessage = pp.destMessage; } if (counter == pp.objectWeWant) { indi.SetActive(false); playPaues.SetActive(false); life.SetActive(false); place.SetActive(false); game.SetActive(false); finalize.SetActive(true); //////////////////////////////////////////////////////////// finalize } }
// Update is called once per frame void Update() { if (game.activeInHierarchy == true) { PickingAndPlacing pp = targetPlayer.GetComponent <PickingAndPlacing>(); dic = pp.dictionaryRandomDistribution; count = dic.Count; /******************** NO NEED JUST FOR TESTING *********************/ } }
void Awake() { targetPlayer = GameObject.Find("_3rd Person Controller"); selectRandom = sequence.randomForSequence(0, myList.Count - 1, myList.Count); // list of Unique random number created pp = targetPlayer.GetComponent <PickingAndPlacing>(); }