Ejemplo n.º 1
0
    private IEnumerator ValidateCrossup_Coroutine(Transform victimAttackTransform)
    {
        // Wait for landing
        while (m_MovementComponent.IsJumping())
        {
            yield return(null);
        }

        m_MovementComponent.GetOnJumpingXPositions(out float myXPosition, out float enemyXPosition);
        if (myXPosition < enemyXPosition)
        {
            if (m_Owner.transform.position.x > victimAttackTransform.position.x)
            {
                HitNotificationEventParameters hitNotifParams = new HitNotificationEventParameters(EHitNotificationType.Crossup);
                Utils.GetPlayerEventManager(m_Owner).TriggerEvent(EPlayerEvent.HitNotification, hitNotifParams);
            }
        }
        else
        {
            if (m_Owner.transform.position.x < victimAttackTransform.position.x)
            {
                HitNotificationEventParameters hitNotifParams = new HitNotificationEventParameters(EHitNotificationType.Crossup);
                Utils.GetPlayerEventManager(m_Owner).TriggerEvent(EPlayerEvent.HitNotification, hitNotifParams);
            }
        }
    }
Ejemplo n.º 2
0
    private void OnHitNotification(BaseEventParameters baseParams)
    {
        HitNotificationEventParameters hitNotifParams = (HitNotificationEventParameters)baseParams;

        if (hitNotifParams.m_HitNotificationType != EHitNotificationType.None)
        {
            TriggerNotification_Internal(hitNotifParams.m_HitNotificationType);
        }
    }