void Awake() { currentHealth = maxHealth; animatorController = GetComponent <ZombieAnimatorController> (); trigger = GetComponent <BoxCollider> (); SetupAgent(); }
protected void Initialization() { halfHeight = GetComponent <Collider>().bounds.extents.y; //Przypisanie wysokosci jednostki nad ziemia do zmiennej CenterPosition(); CharacterAnimController = GetComponentInChildren <CharacterAnimatorController>(); ZombieAnimaController = GetComponentInChildren <ZombieAnimatorController>(); Weapon = GameObject.FindGameObjectWithTag("ActivePlayer").GetComponent <Weapon>(); TurnManager.AddUnit(this); //Dodanie jednostki }