// Start is called before the first frame update void Start() { t = Camera.main.transform; audioSource = Camera.main.GetComponent <AudioSource>(); civManager = FindObjectOfType <CivManager>(); civMovement = GetComponent <CivMovement>(); baseMaxTime = maxHurtTime; baseTimeInterval = timeInterval; }
// Start is called before the first frame update void Awake() { civs = FindObjectOfType <CivManager>(); if (magicWall != null) { magicWall.SetActive(false); } if (civs != null) { numOfCivs = civs.GetNumOfCivs(); } }
private void Success() { if (civs == null) { civs = FindObjectOfType <CivManager>(); } lightAnim.SetBool("lvlSuccess", true); civs.Success(); if (magicWall != null) { magicWall.SetActive(true); } }