Skip to content
Snippets Groups Projects
Commit 3ed5be42 authored by Addin Munawwar's avatar Addin Munawwar
Browse files
parents ee0aafae 60ceea5b
Branches
Tags
No related merge requests found
...@@ -54,7 +54,7 @@ Material: ...@@ -54,7 +54,7 @@ Material:
m_Ints: [] m_Ints: []
m_Floats: m_Floats:
- _Exposure: 1 - _Exposure: 1
- _Rotation: 36.82465 - _Rotation: 95.503204
m_Colors: m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1}
- _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} - _Tint: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
fileFormatVersion: 2 fileFormatVersion: 2
guid: 1ac6e0efc01154936905e5bd1dda76e8 guid: 29f4a353bd63644df8f765c584a7bf43
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
......
This source diff could not be displayed because it is too large. You can view the blob instead.
fileFormatVersion: 2 fileFormatVersion: 2
guid: 25c5647bf4fd94dc5ae2e048929b9597 guid: b25d882ba10844fbeab3c48501eee62f
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
......
...@@ -21,12 +21,16 @@ public abstract class Damageable : MonoBehaviour ...@@ -21,12 +21,16 @@ public abstract class Damageable : MonoBehaviour
public DamageableEvents Events; public DamageableEvents Events;
protected bool healthIsSet = false;
protected virtual void Awake() { protected virtual void Awake() {
currentHealth = maxHealth; currentHealth = maxHealth;
Debug.Log("Damageable Awake");
} }
public virtual void SetHealth(float health) public virtual void SetHealth(float health)
{ {
healthIsSet = true;
currentHealth = health; currentHealth = health;
if (currentHealth > maxHealth) if (currentHealth > maxHealth)
{ {
......
...@@ -62,9 +62,11 @@ public class PlayerHealth : Damageable ...@@ -62,9 +62,11 @@ public class PlayerHealth : Damageable
public override void SetHealth(float health) public override void SetHealth(float health)
{ {
this.Start();
base.SetHealth(health); base.SetHealth(health);
ui.fillSlider.value = health; ui.fillSlider.value = health;
ui.easeFillSlider.value = health; ui.easeFillSlider.value = health;
Debug.Log("Set health to " + health);
} }
public override void Heal(float amount) { public override void Heal(float amount) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment