projectile and enemy collision. Iniitial player death state (teleport to start)
This commit is contained in:
@@ -68,6 +68,10 @@ public class CraftingTable : MonoBehaviour
|
||||
item1 = null;
|
||||
}
|
||||
}
|
||||
else if((item1.name.StartsWith("wand") && item2.name.StartsWith("Crystal")) || (item2.name.StartsWith("wand") && item1.name.StartsWith("Crystal")))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Debug.LogError("Invalid Recipe!");
|
||||
|
||||
@@ -14,24 +14,28 @@ public class PlayerInfo : MonoBehaviour
|
||||
private GameObject rightHandHeld;
|
||||
private GameObject leftHandHeld;
|
||||
|
||||
public Transform spawnLocation;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Instance = this;
|
||||
health = 5;
|
||||
essence_basic = 0;
|
||||
essence_basic = 1;
|
||||
rightHandHeld = null;
|
||||
leftHandHeld = null;
|
||||
}
|
||||
|
||||
public bool AddHealth(int value)
|
||||
public void AddHealth(int value)
|
||||
{
|
||||
health += value;
|
||||
if (health <= 0)
|
||||
{
|
||||
transform.position = spawnLocation.position;
|
||||
health = 5;
|
||||
Debug.Log("NO HEALTH REMAINING");
|
||||
return false;
|
||||
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
public bool AddEssenceBasic(int value)
|
||||
|
||||
@@ -6,14 +6,9 @@ public class WandData : MonoBehaviour
|
||||
{
|
||||
public float power = 1f;
|
||||
|
||||
//public string element = "water";
|
||||
public string element = null;
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void SetPower(float pow)
|
||||
{
|
||||
power = pow;
|
||||
|
||||
Reference in New Issue
Block a user