Fix health bar flip
This commit is contained in:
parent
48041ea26e
commit
3700cf800a
@ -48,6 +48,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: c537e1bd61b8d5c42b1ec03f90e14855, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
arena: {fileID: 0}
|
||||
gameFlowManager: {fileID: 0}
|
||||
<Health>k__BackingField: 40
|
||||
healthBar: {fileID: 1378753993005748510}
|
||||
@ -343,11 +344,23 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2962150095602046910, guid: d1d8f8326b5490848a9400aa9bd6b2f4, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0.4
|
||||
value: 1.2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2962150095602046910, guid: d1d8f8326b5490848a9400aa9bd6b2f4, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0.05
|
||||
value: 0.15
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2962150095602046910, guid: d1d8f8326b5490848a9400aa9bd6b2f4, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2962150095602046910, guid: d1d8f8326b5490848a9400aa9bd6b2f4, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2962150095602046910, guid: d1d8f8326b5490848a9400aa9bd6b2f4, type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: d1d8f8326b5490848a9400aa9bd6b2f4, type: 3}
|
||||
|
||||
@ -130,6 +130,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 7e480b0ef5998894283e8091830941cb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
arena: {fileID: 0}
|
||||
gameFlowManager: {fileID: 0}
|
||||
<Health>k__BackingField: 40
|
||||
healthBar: {fileID: 7668921808924868904}
|
||||
@ -353,11 +354,23 @@ PrefabInstance:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2962150095602046910, guid: d1d8f8326b5490848a9400aa9bd6b2f4, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 0.4
|
||||
value: 1.2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2962150095602046910, guid: d1d8f8326b5490848a9400aa9bd6b2f4, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0.05
|
||||
value: 0.15
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2962150095602046910, guid: d1d8f8326b5490848a9400aa9bd6b2f4, type: 3}
|
||||
propertyPath: m_LocalScale.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2962150095602046910, guid: d1d8f8326b5490848a9400aa9bd6b2f4, type: 3}
|
||||
propertyPath: m_LocalScale.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2962150095602046910, guid: d1d8f8326b5490848a9400aa9bd6b2f4, type: 3}
|
||||
propertyPath: m_LocalScale.z
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: d1d8f8326b5490848a9400aa9bd6b2f4, type: 3}
|
||||
|
||||
@ -2,9 +2,9 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
public class AIEntity : Entity
|
||||
{
|
||||
[FormerlySerializedAs("stats")] [SerializeField]
|
||||
public class AIEntity : Entity {
|
||||
[FormerlySerializedAs("stats")]
|
||||
[SerializeField]
|
||||
public AIStats AIStats = null!;
|
||||
BaseState currentState = null!;
|
||||
public EntityFlag enemies { get; protected set; }
|
||||
@ -64,6 +64,8 @@ public class AIEntity : Entity
|
||||
Vector3 scaler = transform.localScale;
|
||||
scaler.x *= -1;
|
||||
transform.localScale = scaler;
|
||||
|
||||
healthBar.gameObject.transform.localScale = scaler;
|
||||
}
|
||||
|
||||
public void FlipAccordingToInput() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user