Example #1
0
    void OnTriggerEnter2D(Collider2D other)
    {
        if (CollisionUtility.CheckCollider2DType(other) != CollisionType.OwnPlayer)
        {
            return;
        }

        ExecuteEvents.Execute <IUiParametersReceiver>(
            UiParametersWindow.GetInstance().gameObject,
            null,
            (handler, eventData) => { handler.OnReceiveLaunchMessage(); }
            );
    }
    void OnTriggerEnter2D(Collider2D other)
    {
        CollisionType colType = CollisionUtility.CheckCollider2DType(other);

        if (colType == CollisionType.NonePlayer)
        {
            return;
        }

        Player player = CollisionUtility.GetPlayerFromCollider2D(other);

        player.Damaged();

        if (colType == CollisionType.OwnPlayer)
        {
            _fadeoutComponent.StartFadeout(FadeoutTime);
        }
    }