diff options
author | chai <chaifix@163.com> | 2021-09-17 00:13:31 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-09-17 00:13:31 +0800 |
commit | b7a445554e3f57b5fe4b1f1c619d0bed022893b6 (patch) | |
tree | 8794db6dadd464f922e76902a6441087c255d84b /Assets/Scripts/Unit/Components/UnitState | |
parent | cec37ddb003304a224b804a78479ae46dae58fed (diff) |
+ unit image effect handle
Diffstat (limited to 'Assets/Scripts/Unit/Components/UnitState')
-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) |