Bug
This commit is contained in:
@@ -43,7 +43,7 @@ public class Damageable : MonoBehaviour
|
||||
private void Damage(GameObject damageSource)
|
||||
{
|
||||
if (dying) return;
|
||||
|
||||
|
||||
float actualForce = damageSource.GetComponent<Damageable>().force;
|
||||
Block blockComponent = GetComponent<Block>();
|
||||
if (blockComponent != null && blockComponent.blocking)
|
||||
@@ -95,7 +95,7 @@ public class Damageable : MonoBehaviour
|
||||
{;
|
||||
if (GameManager.Instance != null)
|
||||
{
|
||||
animator.SetTrigger("die");
|
||||
animator.SetBool("die", true);
|
||||
dying = true;
|
||||
}
|
||||
}
|
||||
@@ -103,6 +103,7 @@ public class Damageable : MonoBehaviour
|
||||
public void HandleDeath()
|
||||
{
|
||||
GameManager.Instance.PlayerDied(this);
|
||||
animator.SetBool("die", false);
|
||||
dying = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,9 +24,7 @@ public class HealthBarManager : MonoBehaviour
|
||||
{
|
||||
GameObject player = kvp.Key;
|
||||
GameObject healthBar = kvp.Value;
|
||||
//Vector3 screenPosition = Camera.main.WorldToScreenPoint(player.transform.position);
|
||||
//screenPosition.y += 15;
|
||||
//Vector3 worldPosition = Camera.main.ScreenToWorldPoint(screenPosition);
|
||||
healthBar.GetComponent<TerribleHealthBarScript>().fullHealthColor = GameManager.playerColors[GameManager.players.IndexOf(player)];
|
||||
healthBar.transform.SetPositionAndRotation(new Vector3(player.transform.position.x, player.transform.position.y + 1.5f, player.transform.position.z), Quaternion.identity);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user