title: Unity - Idle Game - First Steps
body: <p>I am ony my very first Steps with Unity and my after programming a lot in PHP/MySQL I want to try out to get my very first "real" game and to understand GUI handling and how to work not just every new page, I'd like to create an IDLE-Game. With a lot of possibilities to extend such a game, it would be the best start. (Examples are "Cookie Clicker" or "Anti Idle - The Game")
  I also already have a minor test running but that works not like I wanted:</p>
  
  <pre><code>using UnityEngine;
  using System.Collections;
  
  public class CookieCounter1 : MonoBehaviour
  {
      int currentCookieCounter;
      int cookiecounter;
      int showMin;
      int showSec;
      float m;
      float s;
      float timeCounter;
      float starttime;
  
      void Start()
      {
          starttime = Time.time;
      }
      void Update ()
      {
          timeCounter = Time.time - starttime;
          m = (timeCounter / 60f);
          showMin = (int)m;
          s = (timeCounter % 60f);
          showSec = (int)s;
          currentCookieCounter = showSec;
      }
      void OnGUI()
      {
          GUI.Label (new Rect (100, 100, 150, 50), "Cookie Counter"+"_" +currentCookieCounter);
          GUI.Label (new Rect (100, 150, 100, 50), "Sec"+"_" +showSec);
          GUI.Label (new Rect (100, 200, 100, 50), "Min"+"_" +showMin);
  
          if(GUI.Button(new Rect(20, 70, 80, 20), "COOKIE"))
          {
              //Einen Cookie hinzugefügt
              currentCookieCounter++;
          }
      }
  }
  </code></pre>
  
  <p>But that just shoots the counter up...
  What I want to realize is the following:
  A backgroundcounter in milliseconds, which is not visible.
  For the first try 4 "buildings". And each building gets also one possible upgrade.
  If you "buy" a building every few few seconds the building generates a specified ammount of money. You can buy the building as much as you want. The Upgrade will e.g. raise the income or shorten the time.</p>
  
  <p>All in all a simple task, but I never did something in c#. </p>