Пример #1
0
    private void secondStageTransition()
    {
        if (!_dead)
        {
            for (int i = 0; i < this.BossSubs.Count; ++i)
            {
                if (this.BossSubs[i] != null)
                {
                    this.BossSubs[i].GoToAttackPosition(this.TransitionSecondPartTime);
                }
            }

            this.LeftEye.transform.parent  = this.EyeAttackRotation.transform;
            this.RightEye.transform.parent = this.EyeAttackRotation.transform;
            this.LeftEye.GetComponent <LerpMovement>().BeginMovement(this.LeftEyeAttack.transform.position, this.TransitionSecondPartTime);
            this.RightEye.GetComponent <LerpMovement>().BeginMovement(this.RightEyeAttack.transform.position, this.TransitionSecondPartTime);
            LerpRotation leftRotation  = this.LeftEye.GetComponent <LerpRotation>();
            LerpRotation rightRotation = this.RightEye.GetComponent <LerpRotation>();
            leftRotation.TargetRotation  = this.LeftEyeAttackStartRotation;
            rightRotation.TargetRotation = this.RightEyeAttackStartRotation;
            leftRotation.RotationSpeed   = this.EyePanPrepareRotationSpeed;
            rightRotation.RotationSpeed  = this.EyePanPrepareRotationSpeed;
            leftRotation.LerpToTargetRotation();
            rightRotation.LerpToTargetRotation();

            _timedCallbacks.AddCallback(this, switchState, this.TransitionSecondPartTime + this.BufferTime);
        }
    }
Пример #2
0
 private void enterRotation()
 {
     _switchState = false;
     _lerpRotation.AddCallback(rotationDone);
     _lerpRotation.TargetRotation = _rotation.GetAngle() + this.AngleIncrement;
     _lerpRotation.LerpToTargetRotation();
 }
Пример #3
0
    private void enterRotation()
    {
        _switchState   = false;
        _rotationsOver = 0;

        foreach (GameObject group in this.SubBossGroups)
        {
            LerpRotation lerpRot = group.GetComponent <LerpRotation>();
            lerpRot.TargetRotation = group.GetComponent <Rotation>().GetAngle() + this.GroupRotationAmount;
            lerpRot.LerpToTargetRotation();
        }
    }
Пример #4
0
 private void beginEyePan()
 {
     if (!_dead)
     {
         LerpRotation leftRotation  = this.LeftEye.GetComponent <LerpRotation>();
         LerpRotation rightRotation = this.RightEye.GetComponent <LerpRotation>();
         leftRotation.AddCallback(eyePanDone);
         rightRotation.AddCallback(eyePanDone);
         leftRotation.TargetRotation  = this.LeftEyePanEndRotation;
         rightRotation.TargetRotation = this.RightEyePanEndRotation;
         leftRotation.RotationSpeed   = this.EyePanRotationSpeed;
         rightRotation.RotationSpeed  = this.EyePanRotationSpeed;
         leftRotation.LerpToTargetRotation();
         rightRotation.LerpToTargetRotation();
     }
 }
Пример #5
0
 private void beginSeeking()
 {
     if (!_dead)
     {
         _seeking = true;
         LerpRotation leftRotation  = this.LeftEye.GetComponent <LerpRotation>();
         LerpRotation rightRotation = this.RightEye.GetComponent <LerpRotation>();
         leftRotation.AddCallback(eyePrepared);
         rightRotation.AddCallback(eyePrepared);
         leftRotation.TargetRotation  = this.LeftEyePanStartRotation;
         rightRotation.TargetRotation = this.RightEyePanStartRotation;
         leftRotation.RotationSpeed   = this.EyePanPrepareRotationSpeed;
         rightRotation.RotationSpeed  = this.EyePanPrepareRotationSpeed;
         leftRotation.LerpToTargetRotation();
         rightRotation.LerpToTargetRotation();
     }
 }