void Start() { ga = GetComponent <GuardAnimator>(); gc = GetComponent <GuardController>(); SetHealthToMax(); }
void Start() { player = GameObject.FindGameObjectWithTag("Player"); ga = GetComponent <GuardAnimator>(); rb = GetComponent <Rigidbody2D>(); bc = GetComponent <BoxCollider2D>(); horizontalOffset = new Vector3(bc.bounds.extents.x, 0.0f); verticalOffset = new Vector3(0.0f, bc.bounds.extents.y); locationIndex = GetRandomLocationIndex(); moveLocation = moveLocations[locationIndex]; idleDuration = Random.Range(idleDurationRange.min, idleDurationRange.max); }
protected new void Awake() { base.Awake(); guardAnimator = GetComponentInChildren <GuardAnimator>(); }