Пример #1
0
 private void enterRotation()
 {
     _switchState = false;
     _lerpRotation.AddCallback(rotationDone);
     _lerpRotation.TargetRotation = _rotation.GetAngle() + this.AngleIncrement;
     _lerpRotation.LerpToTargetRotation();
 }
Пример #2
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();
     }
 }
Пример #3
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();
     }
 }