void OnGUI()
{
if (NewCoin != null)
{
coin.GetComponent<Text>().text = NewCoin();
}
if (NewFans != null)
{
fan.GetComponent<Text>().text = NewFans();
}
if( NewConcert != null)
{
concert.GetComponent<Text>().text = NewConcert();
}
if (newSongData != null)
{
actualSongData = newSongData();
if (actualSongData != null)
{
song.GetComponent<Text>().text = actualSongData.title;
}
}
if (TapPassed != null)
{
GUI.color = Color.yellow;
GUI.Box(
new Rect(
Screen.width / 4-25f,
startingVerticalPos,
(TapPassed()/actualSongData.tapGoal)*(Screen.width/2)+50f,
heightOfBar), "Tap");
}
if (TimePassed != null)
{
GUI.color = Color.red;
GUI.Box(
new Rect(
Screen.width / 4-25f,
startingVerticalPos + heightOfBar + 5f,
(TimePassed() * 5 /actualSongData.tapGoal)*(Screen.width/2)+50f,
heightOfBar), "Time");
}
}