using UnityEngine; using System.Collections; public class TotalScore : MonoBehaviour { public int tempScore=0; // Update is called once per frame void Update () { tempScore += GetComponent ().counter; } }