예제 #1
0
 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;
 }
예제 #2
0
 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");
     }
 }
예제 #3
0
 public static void Increment( CountMe.CountType type )
 {
     Increment( type, 1 );
 }