예제 #1
0
    public void Disable()
    {
        isDisabled = true;
        foreach (var VARIABLE in this.GetComponentsInChildren <SpriteRenderer>())
        {
            VARIABLE.DOFade(0, GameplayConstants.KilledCardFadeOutDuration);
        }

        foreach (TextMeshPro textMeshPro in this.GetComponentsInChildren <TextMeshPro>())
        {
            textMeshPro.DOFade(0, GameplayConstants.KilledCardFadeOutDuration);
        }
    }
예제 #2
0
    public void Kill()
    {
        Sequence seq = DOTween.Sequence();

        seq.Append(this.GetComponent <SpriteRenderer>().DOFade(0, GameplayConstants.KilledCardFadeOutDuration));
        seq.AppendCallback(() => GameObject.Destroy(this.gameObject));
        foreach (var VARIABLE in this.GetComponentsInChildren <SpriteRenderer>())
        {
            VARIABLE.DOFade(0, GameplayConstants.KilledCardFadeOutDuration);
        }

        foreach (TextMeshPro textMeshPro in this.GetComponentsInChildren <TextMeshPro>())
        {
            textMeshPro.DOFade(0, GameplayConstants.KilledCardFadeOutDuration);
        }

        ExitSlot();
    }