diff options
Diffstat (limited to 'Assets/Scripts/Unit/Components/UnitState/PCState.cs')
-rw-r--r-- | Assets/Scripts/Unit/Components/UnitState/PCState.cs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Assets/Scripts/Unit/Components/UnitState/PCState.cs b/Assets/Scripts/Unit/Components/UnitState/PCState.cs index c7cab21c..eae1b370 100644 --- a/Assets/Scripts/Unit/Components/UnitState/PCState.cs +++ b/Assets/Scripts/Unit/Components/UnitState/PCState.cs @@ -78,9 +78,14 @@ public partial class PCState : UnitState LogHelper.LogError("缺少 " + methodFunc); }
m_PrevState = m_State; - m_State = nextState; - - StartCoroutine(m_State.ToString(), param); + m_State = nextState;
+
+ if(m_PrevState != m_State && owner.unitRender != null)
+ {
+ owner.unitRender.SetVisibilityInMainCamera(true);
+ }
+
+ StartCoroutine(m_State.ToString(), param); } bool IsChange(EUnitState newState, bool bForce) |