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

Outcrop modifications

parent 491830bf
Branches
No related tags found
No related merge requests found
......@@ -13,8 +13,8 @@ GameObject:
- component: {fileID: 5733991913862907517}
- component: {fileID: 7985519473791055737}
m_Layer: 0
m_Name: StoneResource
m_TagString: Resource
m_Name: Outcrop
m_TagString: Buildable
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
......@@ -94,7 +94,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
wood: 0
quarry: {fileID: 0}
--- !u!61 &7985519473791055737
BoxCollider2D:
m_ObjectHideFlags: 0
......
......@@ -74,12 +74,6 @@ public class Forest : Resource
StartCoroutine("Grow");
}
// Update is called once per frame
void Update()
{
}
IEnumerator Grow()
{
while (getAmount() < 1000)
......
......@@ -11,6 +11,7 @@ public class Outcrop : MonoBehaviour
private int woodNeeded = 100;
private GameObject quarry;
public Resource neededResource;
public int getAmount()
{
......@@ -48,6 +49,9 @@ public class Outcrop : MonoBehaviour
void Start()
{
setAmount(0);
GameObject go = new GameObject();
neededResource = go.AddComponent<Forest>();
neededResource.enabled = false;
}
// Update is called once per frame
......
......@@ -44,7 +44,7 @@ public class Quarry : Resource
// Start is called before the first frame update
void Start()
{
setEventType(EventType.StoneCut);
setAmount(Random.Range(2000, 4000));
}
......
......@@ -8,6 +8,8 @@ TagManager:
- Tree
- Resource
- Home
- Flag
- Buildable
layers:
- Default
- TransparentFX
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment