public static int GetCount( CountMe.CountType type ) { int iType = (int)type; int count = 0; if((iType>=0) && (iType<Instance.mCounters.Length)) { count = Instance.mCounters[iType]; } else { Debug.LogError("Type "+iType+" out of range"); } return count; }
public static void Increment( CountMe.CountType type, int incValue ) { int iType = (int)type; if((iType>=0) && (iType<Instance.mCounters.Length)) { Instance.mCounters[iType] += incValue; if( Instance.mCounters[iType] < 0 ) { Instance.mCounters[iType] = 0; } } else { Debug.LogError("Type "+iType+" out of range"); } }
public static void Increment( CountMe.CountType type ) { Increment( type, 1 ); }