Esempio n. 1
0
    // Start is called before the first frame update
    void Start()
    {
        //anim = GetComponent<Animator>();
        anim_controller = GetComponentInChildren <Skeleton_Anim_Controller>();

        //Set the move timers
        moveTimer        = UnityEngine.Random.Range(moveTimerMin, moveTimerMax + 1);
        moveTimerCurrent = moveTimer;
        idleTimer        = UnityEngine.Random.Range(idleTimerMin, idleTimerMax + 1);
        idleTimerCurrent = idleTimer;

        SetDirection(-1, 1);
    }
Esempio n. 2
0
    // Start is called before the first frame update
    void Start()
    {
        anim_controller = GetComponentInChildren <Skeleton_Anim_Controller>();

        player = GameObject.FindWithTag("Player");

        chasing = false;

        //Set the move timer
        moveTimer        = UnityEngine.Random.Range(moveTimerMin, moveTimerMax + 1);
        moveTimerCurrent = moveTimer;

        //Set the idle timer
        idleTimer        = UnityEngine.Random.Range(idleTimerMin, idleTimerMax + 1);
        idleTimerCurrent = idleTimer;

        //Set the attack timer
        attackTimerCurrent = attackTimer;

        SetDirection(-1, 1);
    }