Bug
This commit is contained in:
@@ -7,7 +7,10 @@ AnimatorStateTransition:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions: []
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: die
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 1699472617733096240}
|
||||
m_Solo: 0
|
||||
@@ -16,8 +19,8 @@ AnimatorStateTransition:
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 1
|
||||
m_HasExitTime: 1
|
||||
m_ExitTime: 1.05
|
||||
m_HasExitTime: 0
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
@@ -374,7 +377,7 @@ AnimatorController:
|
||||
m_DefaultBool: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
- m_Name: die
|
||||
m_Type: 9
|
||||
m_Type: 4
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
|
||||
@@ -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