Esempio n. 1
0
 public void BuyRoaster()
 {
     ResourceKeeper.resourceList[(int)ResourceName.Cash].Quantity           -= ResourceKeeper.producerList[(int)ProducerName.Coffee_Roaster].MultipliedCost;
     ResourceKeeper.producerList[(int)ProducerName.Coffee_Roaster].Quantity += QuantityModifier.QuantityMod;
     GetComponent <ParticleSystem>().Play();
     ResourceKeeper.SaveProduction((int)ProducerName.Coffee_Roaster);
 }
Esempio n. 2
0
    void Update()
    {
        timer -= Time.deltaTime;
        if (timer <= 0)
        {
            ResourceKeeper.SetupLists();
            if (SaveData.LoadProgression() != 0)
            {
                LocationKeeper.LocationOptions.Add(Location.Columbia);
                LocationKeeper.LocationOptions.Add(Location.Seattle);
                foreach (Location location in LocationKeeper.LocationOptions)
                {
                    if (SaveData.LoadLocation() == location.Name)
                    {
                        LocationKeeper.location = location;
                    }
                }
                ResourceKeeper.LoadResources();

                SaveData.LoadName();
                //load all save data and throw it to loadlevel("MainScene");
                Application.LoadLevel("MainScene");
            }
            else
            {
                Application.LoadLevel("PrepScene");
            }
        }
    }
 private void Awake()
 {
     nukeAudio      = GameObject.FindObjectOfType <NukeAudio>();
     clickerAudio   = GetComponent <ClickerAudio>();
     bombCounter    = 0;
     resourceKeeper = GameObject.FindGameObjectWithTag("ResourceKeeper").GetComponent <ResourceKeeper>();
     viewportCamera = GetComponent <Camera>();
     cameraHolder   = GameObject.FindGameObjectWithTag("CameraHolder").GetComponent <CameraHolder>();
     matchTimer     = GameObject.FindGameObjectWithTag("MatchTimer").GetComponent <MatchTimer>();
     inspectMenu    = GameObject.FindGameObjectWithTag("InspectMenu").GetComponent <InspectMenu>();
     buyTileMenu    = GameObject.FindGameObjectWithTag("BuyTileMenu").GetComponent <BuyTileMenu>();
 }
Esempio n. 4
0
 void OnClick()
 {
     if (this.gameObject.GetComponent <Button> ().GetComponentInChildren <Text> ().text == "Clear Data")
     {
         this.gameObject.GetComponent <Button> ().GetComponentInChildren <Text> ().text = "Confirm?";
     }
     else
     {
         Time.timeScale = 0;
         ResourceKeeper.Clear();
         SaveData.ClearAllSaveData();
         Time.timeScale = 1;
         Application.LoadLevel("PrepScene");
     }
 }
Esempio n. 5
0
 public static void ClearAllSaveData()
 {
     ResourceKeeper.Clear();
     PlayerPrefs.DeleteAll();
 }
Esempio n. 6
0
 void Update()
 {
     ResourceKeeper.Update();
 }
 private void Awake()
 {
     resourceKeeper = GameObject.FindGameObjectWithTag("ResourceKeeper").GetComponent <ResourceKeeper>();
 }