Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        rp           = rp / 3;
        area         = area << 3;
        money        = money / 3;
        profitsMulti = profitsMulti / 3;

        InvokeRepeating("savePrefs", 3, 1);
        AudioListener.volume        = 0.5f;
        audioSource                 = GetComponent <AudioSource> ();
        Application.targetFrameRate = 30;
        InvokeRepeating("checkSpeedHack", 0, 3f);
        startMoneyTimer = (System.DateTime.Now.Ticks / System.TimeSpan.TicksPerMillisecond);
        StartCoroutine(startGame());
        timer         = Time.realtimeSinceStartup;
        dateTimer     = (System.DateTime.Now.Ticks / System.TimeSpan.TicksPerMillisecond);
        rpTxt         = transform.GetChild(2).GetComponentsInChildren <Text> ()[0];
        moneyTxt      = transform.GetChild(2).GetComponentsInChildren <Text> ()[1];
        unlockAreaObj = GameObject.FindGameObjectWithTag("unlockArea");
        unlockAreaObj.SetActive(false);
        areaBgs [0]       = GameObject.FindGameObjectWithTag("areaBg1").GetComponent <Image> ();
        areaBgs [1]       = GameObject.FindGameObjectWithTag("areaBg2").GetComponent <Image> ();
        obstacleImg       = GameObject.FindGameObjectWithTag("obstacle").GetComponent <Image> ();
        areaDropdown      = GetComponentInChildren <Dropdown> ();
        areasUnlocked [0] = true;
        addRp(0);
        addMoney(0);
        StartCoroutine(SaveToFile.fileCheck());
        GameDetails gd = SaveToFile.load();

        if (gd != null)
        {
            gd.load();
        }
        //InvokeRepeating ("save",1,1);
        StartCoroutine(checkMusic());
    }
Ejemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     StartCoroutine(SaveToFile.fileCheck());
     StartCoroutine(SaveToFile.save(false));
     //Debug.Log (area * 3);
 }