title: why are the conditions in my if statement being ignored? C#
body: <p>I know this is a beginner's problem but I cannot progress with my studies until I understand what is going on here. In an if block that I'm executing in Update(), I cannot understand why the two if statements are executed simultaneously. I thought that as soon as the initiative variable was initialized at the start of the block, the compiler would move down to the first if statement to see if the condition is true. If it is true, it would execute the code in that block until the timer reached zero. Then it would move down to the next. If the condition was true in the first, then it would be false in the second so it would move up to the beginning again. A new bool value would be calculated for initiative and the process would be repeated. What's blowing my mind is that no matter what I do, both blocks are executed and the timers are completely ignored. It is very confusing! </p>
  
  <p>I've made some very basic code to highlight the problem I'm having. I'm using this C# code in Unity3d:</p>
  
  <pre><code>public float firstTimer = 2;
  public float secondTimer = 10; 
  public bool initiative; 
  
  void Update()
  {
  
      initiative = InitiativeOrder(); 
  
      if(initiative == true &amp;&amp; firstTimer &gt; 0);
      {
          firstTimer -= Time.deltaTime;
          Debug.Log ("First timer has finished!"); 
      }
  
      if(initiative == false &amp;&amp; secondTimer &gt; 0);
      {
          secondTimer -= Time.deltaTime;
          Debug.Log ("Second timer has finished!"); 
      }
  }
  
  public bool InitiativeOrder()
  {
      float player =  Random.Range(1,10); 
      float enemy = Random.Range(1,10); 
  
      if(player &gt; enemy)
      {
          return true; 
      }
      else if (player &lt; enemy)
      {
          return false; 
      }
      else 
      {
          return true; 
      }
  }
  </code></pre>