コード例 #1
0
    // Start is called before the first frame update
    void Start()
    {
        button = GetComponent <Button>();
        Image image = GetComponent <Image>();
        var   text  = GetComponentInChildren <TextMeshProUGUI>();

        button.onClick.AddListener(() =>
        {
            var imagetargetColor = image.color;
            imagetargetColor.a   = 0;

            button.interactable = false;
            text.DOFade(0, 0.18f).SetEase(Ease.Linear);
            image.DOFade(0, 0.18f).SetEase(Ease.Linear); //(imagetargetColor, 0.15f).SetEase(Ease.OutFlash).Play();
            background.DOFade(0, 0.18f).SetEase(Ease.Linear);

            CameraEffects.StartFadeToBlack(() =>
            {
                Gamemode.LoadSceneBlocking(rooms.Game);
            }, DG.Tweening.Ease.InQuart, 1.2f
                                           );
        });
    }