コイン入手枚数をUIに反映
This commit is contained in:
parent
1477cde4b6
commit
612880fe10
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
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)
|
private void InstantiateEffeect(RectTransform prefab, int count, Vector3 from, Vector3 to, Action callback)
|
||||||
{
|
{
|
||||||
var effect = Instantiate(prefab, Vector3.zero, Quaternion.identity, rootTransform);
|
var effect = Instantiate(prefab, Vector3.zero, Quaternion.identity, rootTransform);
|
||||||
|
effect.GetComponentInChildren<TextMeshProUGUI>().text = count.ToString();
|
||||||
// アニメ50フレーム
|
// アニメ50フレーム
|
||||||
this.CallWaitForSeconds(1.0f, () => {
|
this.CallWaitForSeconds(1.0f, () => {
|
||||||
// コインが到着したらSEとバイブ再生。コインはずみアニメーションを再生
|
// コインが到着したらSEとバイブ再生。コインはずみアニメーションを再生
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue