This is my script for switching a variable to produce an Ikaruga type effect for my game. Different things happen depending on what value (only 1 or 2) "MOD" is set to. In the code, if I set MOD to two, play the scene and then press Fire1, MOD goes to 1. But, if I press fire again, it wont switch back to 2, and if I set MOD to 1 in the code, it will not switch to two. What is wrong? Thanks
function Update (){
if( (Input.GetButtonDown( "Fire1")) && (MOD==1)){MOD=2;}
if( (Input.GetButtonDown( "Fire1")) && (MOD==2)){MOD=1;}
}