Changing enum values with int label

Hello guys,

as i said in the title i want to change enum values.Script works fine, when i am setting new value it goes back to zero never sets a new value sorry for bad english and thanks.

Code:

string[] names = Enum.GetNames(typeof(Enemy.CombatSkills));
    int[] vals = (int[])Enum.GetValues(typeof(Enemy.CombatSkills));
    	for(int y = 0; y < Enum.GetValues(typeof(Enemy.CombatSkills)).Length;y++)
    	{   
              EditorGUILayout.BeginHorizontal();
    	      EditorGUI.indentLevel += 1;
    	      vals[y] = EditorGUILayout.IntField(names[y],vals[y]);
       	      EditorGUI.indentLevel -= 1;
    	      EditorGUILayout.EndHorizontal();	
    					
    	}

nevermind i figured out.Just moved this two lines to enemy class.

    string[] names = Enum.GetNames(typeof(Enemy.CombatSkills));
    int[] vals = (int[])Enum.GetValues(typeof(Enemy.CombatSkills));

and

    for(int y = 0; y < Enum.GetValues(typeof(Enemy.CombatSkills)).Length;y++)
        {   
              EditorGUILayout.BeginHorizontal();
              EditorGUI.indentLevel += 1;
              enemy<em>.vals[y] = EditorGUILayout.IntField(enemy_.names[y],enemy*.vals[y]);*_</em>

EditorGUI.indentLevel -= 1;
EditorGUILayout.EndHorizontal();

}