private void OnStateMachineComplete(StateMachine machine)
        {
            Leyoutech.Utility.DebugUtility.LogWarning("技能", string.Format("OnStateMachineComplete->技能释放完成  ------>  Entity = {0} , 主角 = {1},技能类型 = {2} ,{3}, 技能ID ={4}",
                                                                          m_ISpacecraftSkillProperty.EntityId(),
                                                                          m_ISpacecraftSkillProperty.IsMain(),
                                                                          m_Context.GetObject <SkillData>().BaseData.Value.CategoryType,
                                                                          IsWeaponSkill?"武器技能":"飞船技能",
                                                                          SkillID
                                                                          ));



            SkillRPCNet skillRPC = m_Context.GetObject <SkillRPCNet>();

            if (skillRPC != null)
            {
                skillRPC.Close();
            }
            skillRPC = null;
            m_Context.DeleteObject <SkillRPCNet>();
            m_Context.Clear();
            m_RunningData.Reset();
            if (IsWeaponSkill)
            {
                SendEvent(ComponentEventName.WeaponSkillFinish, new WeaponSkillFinish()
                {
                    IsMain = m_ISpacecraftSkillProperty.IsMain(), skillId = SkillID
                });
            }
            SkillID       = -1;
            IsWeaponSkill = false;
            StageType     = SkillStageType.None;
            m_ISpacecraftSkillProperty.GetPerceptronTarget().ClearSkilltargetEntitys();
        }
        /// <summary>
        /// 角色Entiy 被销毁时
        /// </summary>
        public override void OnDestroy()
        {
            base.OnDestroy();
            m_ISpacecraftSkillProperty.SetChangeGuideSkillTargetAction(null);
            m_ISpacecraftSkillProperty.SetSkillBttonIsDown(false);
            SkillRPCNet skillRPC = m_Context.GetObject <SkillRPCNet>();

            if (skillRPC != null)
            {
                skillRPC.Close();
            }
            skillRPC = null;

            m_Context.Clear(true);
            m_RunningData              = null;
            m_CfgEternityProxy         = null;
            m_Context                  = null;
            m_StateMachine             = null;
            m_ISpacecraftSkillProperty = null;
        }