crafting tweaks

This commit is contained in:
joonasp
2022-04-25 16:06:41 +03:00
parent 96f2f41d9b
commit 73dd34ba61
16 changed files with 9388 additions and 8853 deletions

View File

@@ -27,9 +27,9 @@ public class CraftingTable : MonoBehaviour
StartCoroutine(DelayCast(socket1,1));
}
public Transform Get1()
public void Exit1()
{
return item1;
item1 = null;
}
public void Set2()
@@ -37,9 +37,9 @@ public class CraftingTable : MonoBehaviour
StartCoroutine(DelayCast(socket2, 2));
}
public Transform Get2()
public void Exit2()
{
return item2;
item2 = null;
}
public void Craft()
@@ -68,14 +68,7 @@ public class CraftingTable : MonoBehaviour
item1 = null;
}
}
else if(item1.name.StartsWith("Log") && item2.name.StartsWith("Log"))
{
Instantiate(startWand, output.position, Quaternion.identity);
Destroy(item1.gameObject);
Destroy(item2.gameObject);
item1 = null;
item2 = null;
}
}
Debug.LogError("Invalid Recipe!");
}

View File

@@ -9,6 +9,11 @@ public class WandData : MonoBehaviour
//public string element = "water";
private void Awake()
{
}
public void SetPower(float pow)
{
power = pow;