コード例 #1
0
 private void OnCollect(Collectable.CollectableEventData data)
 {
     if (data.winItem)
     {
         WinGame();
     }
 }
コード例 #2
0
    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]);
    }