Example #1
0
    private void JumpSlightly()
    {
        _currTime = (Time.time - _startTime) / _hopDuration;

        if (_currTime >= 1)
        {
            _currTime = 1;

            transform.LookAt(transform.position - transform.forward);
            _myBoss.CheckForIntroEnd();

            _hopping = false;
            _walking = true;
            _myAnimations.Play("Movement", 0);
        }

        Vector3 c01, c12, c012;

        c01 = (1 - _currTime) * c0 + _currTime * c1;
        c12 = (1 - _currTime) * c1 + _currTime * c2;

        c012 = (1 - _currTime) * c01 + _currTime * c12;

        transform.position = c012;
    }
Example #2
0
    private void WalkAtPlayer()
    {
        _currTime = (Time.time - _startTime) / _walkDuration;

        Vector3 c01;

        c01 = (1 - _currTime) * c0 + _currTime * c1;

        if (_currTime >= 1)
        {
            _currTime = 1;

            _amDone = true;

            _myBoss.CheckForIntroEnd();

            _walking = false;
        }

        transform.position = c01;
    }