crafting tweaks
This commit is contained in:
@@ -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!");
|
||||
}
|
||||
|
||||
@@ -9,6 +9,11 @@ public class WandData : MonoBehaviour
|
||||
//public string element = "water";
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void SetPower(float pow)
|
||||
{
|
||||
power = pow;
|
||||
|
||||
Reference in New Issue
Block a user