Esempio n. 1
0
    void Start()
    {
        ga = GetComponent <GuardAnimator>();

        gc = GetComponent <GuardController>();

        SetHealthToMax();
    }
Esempio n. 2
0
    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);
    }
Esempio n. 3
0
        protected new void Awake()
        {
            base.Awake();

            guardAnimator = GetComponentInChildren <GuardAnimator>();
        }