From 3e893fb81799546631a9cef5e1929ae291f8c8e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leevi=20Gr=C3=B6nlund?= <lejugr@utu.fi>
Date: Sat, 2 Mar 2019 16:50:15 +0200
Subject: [PATCH] Resources changes again

---
 Assets/Scripts/BerryBush.cs | 20 +++++++++++++++++++-
 Assets/Scripts/Outcrop.cs   |  5 +++++
 Assets/Scripts/Quarry.cs    |  6 ++++++
 3 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/Assets/Scripts/BerryBush.cs b/Assets/Scripts/BerryBush.cs
index 41be492..fab9896 100644
--- a/Assets/Scripts/BerryBush.cs
+++ b/Assets/Scripts/BerryBush.cs
@@ -5,15 +5,33 @@ using UnityEngine;
 public class BerryBush : Resource
 {
 
+    private float growthspeed;
+
     public override void checkExistence()
     {
         
     }
 
+    public override void refreshSprite()
+    {
+
+    }
+
     // Start is called before the first frame update
     void Start()
     {
-        
+        resources = Random.Range(50, 200);
+        growthspeed = 1;
+        StartCoroutine("Grow");
+    }
+
+    IEnumerator Grow()
+    {
+        while (resources < 500)
+        {
+            resources++;
+            yield return new WaitForSeconds(growthspeed);
+        }
     }
 
     // Update is called once per frame
diff --git a/Assets/Scripts/Outcrop.cs b/Assets/Scripts/Outcrop.cs
index 1495d06..c89d689 100644
--- a/Assets/Scripts/Outcrop.cs
+++ b/Assets/Scripts/Outcrop.cs
@@ -12,6 +12,11 @@ public class Outcrop : Resource
         }
     }
 
+    public override void refreshSprite()
+    {
+
+    }
+
     // Start is called before the first frame update
     void Start()
     {
diff --git a/Assets/Scripts/Quarry.cs b/Assets/Scripts/Quarry.cs
index d15039e..07199d7 100644
--- a/Assets/Scripts/Quarry.cs
+++ b/Assets/Scripts/Quarry.cs
@@ -12,6 +12,12 @@ public class Quarry : Resource
             Destroy(gameObject);
         }
     }
+
+    public override void refreshSprite()
+    {
+
+    }
+
     // Start is called before the first frame update
     void Start()
     {
-- 
GitLab