void SetColliders() { meatMag = MeatStock.instance; SetDestinationCollider(); //destinationCol = destination.GetComponent<Collider2D> (); mainBaseCol = mainBase.GetComponent<Collider2D> (); }
void Awake () { if (playerInstantiator.Length == 0 || playerInstantiator.Length > 3) { Debug.LogError ("Dupa"); return; } if (instance == null) { instance = this; return; } Destroy (this); }
void Awake() { Invoke("TurnOnScreemer", waitingTime); audioSource = this.GetComponent<AudioSource>(); meatStock = GameObject.FindObjectOfType<MeatStock>(); victoryText.text = ""; retryBtn.onClick.AddListener (RetryBtnAction); toMainMenu.onClick.AddListener (ContinoueAction); //humanCountText = this.GetComponent<Text> (); victoryPanel.SetActive (false); UpdatePlayer (0); playerHumansInstantiator.gameCondition = this; humansInstantiator = GameObject.FindObjectsOfType<HumanInstantiator> (); //botHumanInstantiator = new HumanInstantiator[humansInstantiator.Length]; for (int i = 0; i< humansInstantiator.Length; i++) { humansInstantiator[i].maxHumans = maxPopulation; if (humansInstantiator[i] != playerHumansInstantiator) { botHumanInstantiator.Add(humansInstantiator[i]); } // if(humansInstantiator[i].CompareTag(humansInstantiator)) // { // playerHumansInstantiator = humansInstantiator[i]; // playerHumansInstantiator.gameCondition = this; // // Debug.Log("Ustawiam klase"); // } } }