Example #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);
 }
Example #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>();
 }
Example #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");
     }
 }
Example #5
0
 public static void ClearAllSaveData()
 {
     ResourceKeeper.Clear();
     PlayerPrefs.DeleteAll();
 }
Example #6
0
 void Update()
 {
     ResourceKeeper.Update();
 }
 private void Awake()
 {
     resourceKeeper = GameObject.FindGameObjectWithTag("ResourceKeeper").GetComponent <ResourceKeeper>();
 }