private void OnCollect(Collectable.CollectableEventData data) { if (data.winItem) { WinGame(); } }
private void OnCollect(Collectable.CollectableEventData data) { String collectableName = data.collected.GetComponent <Collectable>().getCollectableName(); int oldValue = m_collectableScores[collectableName]; m_collectableScores[collectableName] += data.collected.GetComponent <Collectable>().ScoreValue; //Debug.Log("[ScoreSystem] update Score for "+ collectableName + " from " + oldValue + " to " + m_collectableScores[collectableName]); }