예제 #1
0
 void OnPlayModePreToggle(bool isInPlayMode)
 {
     if (!isInPlayMode)
     {
         m_DeathSequence.Cancel();
     }
 }
예제 #2
0
  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);
  }
예제 #3
0
 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));
     }
 }
예제 #4
0
 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);
    }
예제 #6
0
 public void StopPay()
 {
     if (_paySeq != null)
     {
         _paySeq.Cancel();
         _paySeq = null;
     }
 }
예제 #7
0
    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);
    }
예제 #8
0
 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));
 }
예제 #9
0
 void CancelActionZoom()
 {
     m_ActionZoomSequence.Cancel();
     m_ActionZoomSequence = ActionMaster.Actions.Sequence();
 }
예제 #10
0
 void CancelOffsetMove()
 {
     m_OffsetMoveSequence.Cancel();
     m_OffsetMoveSequence = ActionMaster.Actions.Sequence();
 }