merge joonasp joonasty
This commit is contained in:
@@ -4,22 +4,15 @@ using UnityEngine;
|
||||
|
||||
public class PlayerInfo : MonoBehaviour
|
||||
{
|
||||
public static PlayerInfo Instance;
|
||||
|
||||
private int health;
|
||||
|
||||
private int essence_basic;
|
||||
|
||||
private GameObject rightHandHeld;
|
||||
private GameObject leftHandHeld;
|
||||
//Add elemental essences?
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Instance = this;
|
||||
health = 5;
|
||||
essence_basic = 0;
|
||||
rightHandHeld = null;
|
||||
leftHandHeld = null;
|
||||
}
|
||||
|
||||
public void AddHealth(int value)
|
||||
@@ -27,7 +20,7 @@ public class PlayerInfo : MonoBehaviour
|
||||
health += value;
|
||||
if (health <= 0)
|
||||
{
|
||||
Debug.Log("NO HEALTH REAMINING");
|
||||
Debug.Log("NO HEALTH REMAINING");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,39 +28,8 @@ public class PlayerInfo : MonoBehaviour
|
||||
{
|
||||
if (essence_basic + value < 0)
|
||||
{
|
||||
Debug.Log("NOT ENOUGH ESSENCE");
|
||||
Debug.LogError("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 GetLeftHand()
|
||||
{
|
||||
return leftHandHeld;
|
||||
}
|
||||
|
||||
public GameObject GetRightHand()
|
||||
{
|
||||
return rightHandHeld;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 51150922d2ca8cc44b6fc27d9365a8d4
|
||||
guid: 08f72f5d017837743b67d344a6a7ed52
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
||||
Reference in New Issue
Block a user