title: Why is my integer value increasing more than once in Unity3D
body: <p>I am using Unity3D and C# to create a game. I have some code that adds 5 to the coin number when the player wins the level. This is what is consists of:</p>
  <pre><code>if (scoreText.scoreNum &gt;= NumberOfBricksNeeded)
      {
          if(HasClickedOk == false)
          {
              LevelFinishedUIs.SetActive(true);
  
              if (IsPlayingCampaign1 == true)
              {
                  coins.CoinNumber += 5;
                  dead.GameOver = false;
                  FinishedLevel1UI.SetActive(true);
                  Debug.Log(&quot;FinishedLevel&quot;);
                  IsPlayingCampaign1 = false;
                  isPlayingCampaign = false;
                  HasClickedOk = true;
                  One.sprite = OneFin;
                  skins.HasEarnedGoldSkin = true;
                  skinSaver.Gold = true;
                  
                  
                  campaignSaver.LevelsCompleted = 1;
                  
              }
  
              if (IsPlayingCampaign2 == true)
              {
                  coins.CoinNumber += 5;
                  dead.GameOver = false;
                  FinishedLevel2UI.SetActive(true);
                  Debug.Log(&quot;FinishedLevel&quot;);
                  IsPlayingCampaign2 = false;
                  isPlayingCampaign = false;
                  HasClickedOk = true;
                  TwoA.sprite = TwoAFin;
                  skins.HasEarnedMeteorSkin = true;
                  skinSaver.Meteor = true;
                  
                  
                  campaignSaver.LevelsCompleted = 2;
              }
  </code></pre>
  <p>Whilst the first one works and adds 5, the second does not. The problem is that it adds 10 to the number instead of 5. I checked the values such as 'HasClickedOk' and 'isPlayingCampaign_' but they are all the appropiate values. Originally, I thought that it was running twice. However, I logged the number of coins to the console and they increased by 10 directly. Not by 5 twice. Is it possible that I have missed something?</p>
  <p>Thanks,</p>