コイン入手枚数をUIに反映

This commit is contained in:
kimura 2021-08-06 14:36:06 +09:00
parent 1477cde4b6
commit 612880fe10
1 changed files with 2 additions and 0 deletions

View File

@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
@ -55,6 +56,7 @@ public class CoinManager : SingletonMonoBehaviour<CoinManager>
private void InstantiateEffeect(RectTransform prefab, int count, Vector3 from, Vector3 to, Action callback)
{
var effect = Instantiate(prefab, Vector3.zero, Quaternion.identity, rootTransform);
effect.GetComponentInChildren<TextMeshProUGUI>().text = count.ToString();
// アニメ50フレーム
this.CallWaitForSeconds(1.0f, () => {
// コインが到着したらSEとバイブ再生。コインはずみアニメーションを再生