Created
May 12, 2015 15:44
-
-
Save suakig/8e42aaea5010cf867d9e to your computer and use it in GitHub Desktop.
CoinText.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; | |
using System.Collections; | |
public class CoinText : MonoBehaviour | |
{ | |
private Text coinText; | |
void Awake () | |
{ | |
DeleGateAction.OnCoinChange += OnCoinChange; | |
coinText = transform.GetComponent<Text> (); | |
DeleGateAction.CoinChange (); | |
} | |
private void OnCoinChange(int coin) | |
{ | |
coinText.text = "coin:" + coin.ToString (); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment