Having issues setting up values

I need help with my code. What I need to do is when my game runs into a certain enum (state) I need it to subtract one number, only once. But when I do it it shows that it is constantly subtracting. Can anyone help me how do I set it up to where it subtract one number every time it enters into a specific enum state? Many thanks in advance.

using UnityEngine;
using System.Collections;

[ExecuteInEditMode]
public class GUIWindow : MonoBehaviour {
	public enum MyEnum {stuff1, stuff2}
	public MyEnum CurrentEnum = MyEnum.stuff1;
	
	int value1 = 800;
	void Start()
	{

	}
	void Update()
	{
		switch (CurrentEnum) 
		{
		case MyEnum.stuff1:
			value1--;
			Debug.Log(value1);
			break;
		}
	}
}

Update is called once per frame, if you have a game that is 60fps, then 60 calls would be invoked for update. If the enum doesn’t change, then it will continue to hit the decrement of value1 over and over and over, etc.

You need to constrain the switch, if you’re done considering the enum, change it so it doesn’t hit that case any longer.