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); } }
// Use this for initialization public void Initialise() { _lerpPosition = this.GetComponent <LerpPosition>(); _lerpRotation = this.GetComponent <LerpRotation>(); _defaultLayer = this.gameObject.layer; //event listener _lerpPosition.OnLerpFinished += _lerpPosition_OnLerpFinished; }
// Use this for initialization public void Initialise () { _lerpPosition = this.GetComponent<LerpPosition>(); _lerpRotation = this.GetComponent<LerpRotation>(); _defaultLayer = this.gameObject.layer; //event listener _lerpPosition.OnLerpFinished += _lerpPosition_OnLerpFinished; }
// Use this for initialization public void Init() { _lerpRotation = GetComponent<LerpRotation>(); //event handlers for the card _MouseEvents.OnPointerEnterUI += _MouseEvents_OnPointerEnterUI; _MouseEvents.OnPointerExitUI += _MouseEvents_OnPointerExitUI; _MouseEvents.OnPointerUpUI += _MouseEvents_OnPointerUpUI; //set y defualt _imageYDefualt = _Image.transform.localPosition.y; }
// Use this for initialization public void Init() { _lerpRotation = GetComponent <LerpRotation>(); //event handlers for the card _MouseEvents.OnPointerEnterUI += _MouseEvents_OnPointerEnterUI; _MouseEvents.OnPointerExitUI += _MouseEvents_OnPointerExitUI; _MouseEvents.OnPointerUpUI += _MouseEvents_OnPointerUpUI; //set y defualt _imageYDefualt = _Image.transform.localPosition.y; }
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(); } }
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(); } }
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(); } }