/// <summary> /// 重置 /// </summary> public void Restore() { CacheSkin(); //要在他们之前清理,因为动态脚本是依赖静态脚本的 DestroyDynamicCommopnent(); if (skinControl) { skinControl.Clear(); skinControl = null; } if (m_property) { m_property.Restore(); m_property = null; } if (m_stateMachine) { m_stateMachine.Clear(); m_stateMachine.ResetAllMembers(); m_stateMachine = null; } if (m_LightEffectManager) { m_LightEffectManager.Clear(); m_LightEffectManager.Restore(); m_LightEffectManager = null; } m_SkillCtrl = null; UBloodManager.Instance.DestroyBlood(ID); commands.Clear(); //commands = null; }