Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class DollarPerSec : MonoBehaviour {
- public UnityEngine.UI.Text dpsDisplay;
- public Click click;
- public ItemManager[] items;
- private void Start()
- {
- StartCoroutine(AutoTick());
- }
- private void Update()
- {
- dpsDisplay.text = GetDollarsPerSec() + " Dollars/sec";
- }
- public int GetDollarsPerSec()
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Click : MonoBehaviour
- {
- public UnityEngine.UI.Text CPC;
- public UnityEngine.UI.Text Cash;
- public float gold;
- public int goldperclick = 1;
- public Click(int goldperclick)
- {
- this.goldperclick = goldperclick;
- }
- private void Start()
- {
- loadStuff();
- }
- private void Update()
- {
- Cash.text = "Cash: " + gold;
- CPC.text = "Dollars/Click: " + goldperclick;
- PlayerPrefs.SetFloat("gold", gold);
- }
- public void clicked()
- {
- gold += goldperclick;
- }
- public void loadStuff()
- {
- gold = PlayerPrefs.GetFloat("gold");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement