Skip to content
Snippets Groups Projects
Commit 3e893fb8 authored by Leevi Grönlund's avatar Leevi Grönlund
Browse files

Resources changes again

parent a5cd597a
No related branches found
No related tags found
No related merge requests found
...@@ -5,15 +5,33 @@ using UnityEngine; ...@@ -5,15 +5,33 @@ using UnityEngine;
public class BerryBush : Resource public class BerryBush : Resource
{ {
private float growthspeed;
public override void checkExistence() public override void checkExistence()
{ {
} }
public override void refreshSprite()
{
}
// Start is called before the first frame update // Start is called before the first frame update
void Start() 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 // Update is called once per frame
......
...@@ -12,6 +12,11 @@ public class Outcrop : Resource ...@@ -12,6 +12,11 @@ public class Outcrop : Resource
} }
} }
public override void refreshSprite()
{
}
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
......
...@@ -12,6 +12,12 @@ public class Quarry : Resource ...@@ -12,6 +12,12 @@ public class Quarry : Resource
Destroy(gameObject); Destroy(gameObject);
} }
} }
public override void refreshSprite()
{
}
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment