public static void SetIntegerVariable(INTEGERVAR variable, int value)
 {
     if (variable < INTEGERVAR.MAX)
     {
         integerVariables[(int)variable] = value;
     }
     else
     {
         Debug.LogError("SetIntegerVariable: Trying to get MAX index!");
     }
 }
 public static int GetIntegerVariable(INTEGERVAR variable)
 {
     if (variable < INTEGERVAR.MAX)
     {
         return(integerVariables[(int)(variable)]);
     }
     else
     {
         Debug.LogError("GetIntegerVariable: Trying to get MAX index!");
         return(0);
     }
 }
Пример #3
0
    void Awake()
    {
        switch (playerNumber)
        {
        case 1:
            playerVariable = INTEGERVAR.player_one_score;
            break;

        case 2:
            playerVariable = INTEGERVAR.player_two_score;
            break;
        }
    }
 public static string IntegerVarToString(INTEGERVAR variable)
 {
     return("INT" + ((int)(variable)).ToString());
 }