how to work modes

im trying to get my game to switch back and forth between modes.

public GameObject attack;
public GameObject defense;

public int shift;

// Use this for initialization
void Start () {
	int shift = 1;
	attack.SetActive (true);
	defense.SetActive (false);
}

void Update ()
{
	if (Input.GetButton ("Fire2") && shift == 1) {
		attack.SetActive (true);
		defense.SetActive (false);
		shift = shift + 1;
	} 
	else if (Input.GetButton ("Fire2") && shift == 2) {
		attack.SetActive (false);
		defense.SetActive (true);
		shift = - 1;
	}

}

but the code only switches the mode from 1 to 2 and it wont switch it back

I think you meant to decrement the shift, but you set shift to -1 on line 24

void Update ()
 {
     if (Input.GetButton ("Fire2") && shift == 1) {
         attack.SetActive (true);
         defense.SetActive (false);
         shift += 1; // same as shift = shift + 1 or use shift++(increment)
     } 
     else if (Input.GetButton ("Fire2") && shift == 2) {
         attack.SetActive (false);
         defense.SetActive (true);
         shift -= 1; // same as shift = shift - 1 or use shift--(decrement)
     }
 }