void OnPlayModePreToggle(bool isInPlayMode) { if (!isInPlayMode) { m_DeathSequence.Cancel(); } }
void Activate() { HotkeyMaster.s_HotkeysEnabled = false; m_Active = true; m_Image.enabled = true; m_Image.raycastTarget = true; m_ActivationSequence.Cancel(); m_ActivationSequence = ActionMaster.Actions.Sequence(); m_ActivationSequence.UiAlpha(gameObject, m_ActiveAlpha, m_TintDuration); }
public void FaceRight(bool snap = false) { if (snap) { m_LookAngle = m_RightLookAngle; } else { m_FaceSequence.Cancel(); m_FaceSequence = ActionMaster.Actions.Sequence(); m_FaceSequence.TurnFacing(gameObject, m_RightLookAngle, m_FaceDuration, new Ease(Ease.Quad.InOut)); } }
void Land() { m_LandingSquashSequence.Cancel(); m_LandingSquashSequence = ActionMaster.Actions.Sequence(); m_LandingSquashSequence.Scale(m_LandingSquashNode.gameObject, m_LandingSquashScale, m_LandingSquashDuration / 2, new Ease(Ease.Quad.Out)); m_LandingSquashSequence.Scale(m_LandingSquashNode.gameObject, Vector3.one, m_LandingSquashDuration / 2, new Ease(Ease.Quad.In)); }
public void OnDied(HealthEventData eventData) { if (!enabled) { return; } enabled = false; if (m_IsTheHero) { GlobalData.DispatchHeroDied(); } m_Rigidbody.freezeRotation = false; var velocity = m_Rigidbody.velocity; velocity.y = m_DeathSpeed; var angularVelocity = Random.Range(-m_DeathAngularVelocity, m_DeathAngularVelocity); m_Rigidbody.velocity = velocity; m_Rigidbody.angularVelocity = angularVelocity; m_DeathSequence.Cancel(); m_DeathSequence = ActionMaster.Actions.Sequence(); m_DeathSequence.SpriteAlpha(m_BodySpriteRenderer.gameObject, 0, m_DeathDuration, new Ease(Ease.Quad.Out)); m_DeathSequence.Call(SequenceEnd, gameObject); }
public void StopPay() { if (_paySeq != null) { _paySeq.Cancel(); _paySeq = null; } }
void FadeIn(Color color, float fadeDuration, float delay) { color.a = 0; m_Image.enabled = true; m_Image.color = color; m_FadeSequence.Cancel(); m_FadeSequence = ActionMaster.Actions.Sequence(); m_FadeSequence.UiAlpha(gameObject, 1, fadeDuration, new Ease(Ease.Quad.InOut)); m_FadeSequence.Delay(delay); m_FadeSequence.Call(FadeInEnded, gameObject); }
public void LookUp() { m_LookSequence.Cancel(); m_LookSequence = ActionMaster.Actions.Sequence(); m_LookSequence.MoveLocalY(m_EyesRoot.gameObject, m_LookDefaultY + m_LookHeight, m_LookDuration, new Ease(Ease.Quad.InOut)); }
void CancelActionZoom() { m_ActionZoomSequence.Cancel(); m_ActionZoomSequence = ActionMaster.Actions.Sequence(); }
void CancelOffsetMove() { m_OffsetMoveSequence.Cancel(); m_OffsetMoveSequence = ActionMaster.Actions.Sequence(); }