コード例 #1
0
    private void OnTriggerExit2D(Collider2D collision)
    {
        if (collision.GetComponentInParent <Controller>())
        {
            Controller player = collision.GetComponentInParent <Controller>();
            triggeredPlayers.Remove(player);
            player.isTriggeringCharacterCustomizer = false;
            CustomizerController controller = player.GetComponent <CustomizerController>();
            controller.customization = null;

            if (isInUse)
            {
                return;
            }

            if (triggeredPlayers != null)
            {
                if (triggeredPlayers.Count >= 1)
                {
                    Setup(triggeredPlayers[0]);
                    return;
                }
            }

            uiDisplay.SetActive(false);
        }
    }
コード例 #2
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.GetComponentInParent <Controller>())
        {
            Controller player = collision.GetComponentInParent <Controller>();
            triggeredPlayers.Add(player);
            player.isTriggeringCharacterCustomizer = transform;
            CustomizerController controller = player.GetComponent <CustomizerController>();
            controller.customization = this;

            if (isInUse)
            {
                return;
            }

            Setup(player);
        }
    }