SHARE
TWEET

kezhdemian

a guest Nov 19th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using UnityEngine.UI;
  2. using UnityEngine;
  3.  
  4. public class ClickScript : MonoBehaviour
  5. {
  6.     public double sheepMaxHealth;
  7.     public double sheepHealth;
  8.     public double damagePerClick;
  9.     public double wool;
  10.     public int sheepCount;
  11.     public double level;
  12.    
  13.     public void Start()
  14.     {
  15.         sheepMaxHealth = 10;
  16.         sheepHealth += sheepMaxHealth;
  17.         damagePerClick = 1;
  18.         wool = 0;
  19.         sheepCount = 0;
  20.         sheepReward = 5;
  21.         maxSheepPerLevel = 10;
  22.         level = 0;
  23.      }
  24.  
  25.     public void DamageClick()
  26.     {
  27.         sheepHealth -= damagePerClick;
  28.     }
  29.  
  30.     public void Update()
  31.     {
  32.         if (sheepHealth == 0) ;
  33.         wool += sheepReward;
  34.         sheepCount += 1;
  35.         sheepHealth += sheepMaxHealth;
  36.  
  37.         if (sheepCount == maxSheepPerLevel) ;
  38.         level += 1;
  39.         sheepMaxHealth *= 1.20;
  40.         sheepReward *= 1.5;
  41.     }
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top