merge fixes and icebolt tweaks
This commit is contained in:
@@ -4,15 +4,23 @@ using UnityEngine;
|
||||
|
||||
public class PlayerInfo : MonoBehaviour
|
||||
{
|
||||
public static PlayerInfo Instance;
|
||||
|
||||
private int health;
|
||||
|
||||
private int essence_basic;
|
||||
//Add elemental essences?
|
||||
|
||||
private GameObject rightHandHeld;
|
||||
private GameObject leftHandHeld;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Instance = this;
|
||||
health = 5;
|
||||
essence_basic = 0;
|
||||
rightHandHeld = null;
|
||||
leftHandHeld = null;
|
||||
}
|
||||
|
||||
public void AddHealth(int value)
|
||||
@@ -28,8 +36,31 @@ public class PlayerInfo : MonoBehaviour
|
||||
{
|
||||
if (essence_basic + value < 0)
|
||||
{
|
||||
Debug.LogError("NOT ENOUGH ESSENCE");
|
||||
Debug.Log("NOT ENOUGH ESSENCE");
|
||||
}
|
||||
else essence_basic += value;
|
||||
}
|
||||
|
||||
public void AddLeftHand(GameObject obj)
|
||||
{
|
||||
leftHandHeld = obj;
|
||||
}
|
||||
|
||||
public void AddRightHand(GameObject obj)
|
||||
{
|
||||
rightHandHeld = obj;
|
||||
}
|
||||
|
||||
public void RemoveLeftHand()
|
||||
{
|
||||
leftHandHeld = null;
|
||||
}
|
||||
|
||||
public void RemoveRightHand()
|
||||
{
|
||||
rightHandHeld = null;
|
||||
}
|
||||
|
||||
public GameObject GetRightHand() { return rightHandHeld; }
|
||||
public GameObject GetLeftHand() { return leftHandHeld; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user