コード例 #1
0
        protected override void OnDestruct()
        {
            EffectManager effect_manager = GetLogicWorld().GetEffectManager();

            if (m_enter_generator != null)
            {
                effect_manager.DestroyGenerator(m_enter_generator.ID, GetOwnerEntityID());
                m_enter_generator = null;
            }
            if (m_period_generator != null)
            {
                effect_manager.DestroyGenerator(m_period_generator.ID, GetOwnerEntityID());
                m_period_generator = null;
            }
            if (m_region != null)
            {
                m_region.Destruct();
                m_region = null;
            }
            if (m_task != null)
            {
                m_task.Cancel();
                LogicTask.Recycle(m_task);
                m_task = null;
            }
        }
コード例 #2
0
 public override void ResetNode()
 {
     if (m_listener_context != null)
     {
         Entity owner = m_context.GetData <Entity>(BTContextKey.OwnerEntity);
         for (int i = 0; i < m_signal_datas.Count; ++i)
         {
             owner.RemoveListener(m_signal_datas[i].m_signal_id, m_listener_context.ID);
         }
         SignalListenerContext.Recycle(m_listener_context);
         m_listener_context = null;
         m_context.GetLogicWorld().UnregisterBehaviorTree(this);
         m_register_id = 0;
     }
     ClearRunningTrace();
     base.ResetNode();
     if (m_context != null)
     {
         BTContext context = m_context;
         SetContext(null);
         RecyclableObject.Recycle(context);
     }
     m_current_running_entry_index = -1;
     if (m_task != null)
     {
         m_task.Cancel();
         LogicTask.Recycle(m_task);
         m_task = null;
     }
 }
コード例 #3
0
        public void Explode(Entity entity)
        {
#if COMBAT_CLIENT
            if (m_collision_sound_cfgid > 0)
            {
                PlaySoundMessage sound_msg = RenderMessage.Create <PlaySoundMessage>();
                sound_msg.Construct(GetOwnerEntityID(), m_collision_sound_cfgid, FixPoint.MinusOne);
                GetLogicWorld().AddRenderMessage(sound_msg);
            }
#endif

            ApplyGenerator(entity);

            if (entity == null || !m_pierce_entity)
            {
#if COMBAT_CLIENT
                LocomoteRenderMessage msg = RenderMessage.Create <LocomoteRenderMessage>();
                msg.ConstructAsStopMoving(ParentObject.ID, true);
                GetLogicWorld().AddRenderMessage(msg);
#endif
                if (m_task != null)
                {
                    m_task.Cancel();
                    LogicTask.Recycle(m_task);
                    m_task = null;
                }
                EntityUtil.KillEntity((Entity)ParentObject, ParentObject.ID);
            }
        }
コード例 #4
0
        protected override void OnDestruct()
        {
            if (m_die_task != null)
            {
                m_die_task.Cancel();
                LogicTask.Recycle(m_die_task);
                m_die_task = null;
            }
            EffectManager effect_manager = GetLogicWorld().GetEffectManager();

            if (m_born_generator != null)
            {
                effect_manager.DestroyGenerator(m_born_generator.ID, GetOwnerEntityID());
                m_born_generator = null;
            }
            if (m_die_generator != null)
            {
                effect_manager.DestroyGenerator(m_die_generator.ID, GetOwnerEntityID());
                m_die_generator = null;
            }
            if (m_killer_generator != null)
            {
                effect_manager.DestroyGenerator(m_killer_generator.ID, GetOwnerEntityID());
                m_killer_generator = null;
            }
        }
コード例 #5
0
 protected override void OnDestruct()
 {
     if (m_task != null)
     {
         m_task.Cancel();
         LogicTask.Recycle(m_task);
         m_task = null;
     }
 }
コード例 #6
0
 void CancelTask()
 {
     if (m_combo_task == null)
     {
         return;
     }
     m_combo_task.Cancel();
     LogicTask.Recycle(m_combo_task);
     m_combo_task = null;
 }
コード例 #7
0
 protected override void OnDestruct()
 {
     DeleteLocomotorSpeedRateTask();
     if (m_task != null)
     {
         m_task.Cancel();
         LogicTask.Recycle(m_task);
         m_task = null;
     }
 }
コード例 #8
0
 void DeleteLocomotorSpeedRateTask()
 {
     if (m_update_locomotor_speed_rate_task == null)
     {
         return;
     }
     m_update_locomotor_speed_rate_task.Cancel();
     LogicTask.Recycle(m_update_locomotor_speed_rate_task);
     m_update_locomotor_speed_rate_task = null;
 }
コード例 #9
0
        public override void Unapply()
        {
            m_task.Cancel();
            LogicTask.Recycle(m_task);
            m_task = null;
#if COMBAT_CLIENT
            LocomoteRenderMessage msg = RenderMessage.Create <LocomoteRenderMessage>();
            msg.ConstructAsStopMoving(GetOwnerEntityID(), false, LocomoteRenderMessage.NotFromCommand);
            GetLogicWorld().AddRenderMessage(msg);
#endif
        }
コード例 #10
0
 protected override void OnDestruct()
 {
     SignalListenerContext.Recycle(m_listener_context);
     m_listener_context = null;
     if (m_task != null)
     {
         m_task.Cancel();
         LogicTask.Recycle(m_task);
         m_task = null;
     }
 }
コード例 #11
0
        protected override void OnDestruct()
        {
            RecyclableObject.Recycle(m_damage_amount);
            m_damage_amount = null;

            if (m_period_task != null)
            {
                m_period_task.Cancel();
                LogicTask.Recycle(m_period_task);
                m_period_task = null;
            }
        }
コード例 #12
0
 protected override void PreDestruct()
 {
     if (m_task != null)
     {
         m_task.Cancel();
         LogicTask.Recycle(m_task);
         m_task = null;
     }
     if (m_is_active)
     {
         Deactivate(true);
     }
 }
コード例 #13
0
 protected override void OnDestruct()
 {
     if (m_collision_target_generator != null)
     {
         GetLogicWorld().GetEffectManager().DestroyGenerator(m_collision_target_generator.ID, GetOwnerEntityID());
         m_collision_target_generator = null;
     }
     if (m_task != null)
     {
         m_task.Cancel();
         LogicTask.Recycle(m_task);
         m_task = null;
     }
 }
コード例 #14
0
 protected override void OnDestruct()
 {
     m_targeting_component = null;
     SignalListenerContext.Recycle(m_listener_context);
     m_listener_context = null;
     if (m_task != null)
     {
         m_task.Cancel();
         LogicTask.Recycle(m_task);
         m_task = null;
     }
     ClearTargets();
     m_current_enemy = null;
 }
コード例 #15
0
 protected override void OnDestruct()
 {
     if (m_param != null)
     {
         RecyclableObject.Recycle(m_param);
         m_param = null;
     }
     if (m_task != null)
     {
         m_task.Cancel();
         LogicTask.Recycle(m_task);
         m_task = null;
     }
 }
コード例 #16
0
        void StopSpurt()
        {
            if (m_task == null)
            {
                return;
            }
            m_task.Cancel();
            LogicTask.Recycle(m_task);
            m_task = null;
#if COMBAT_CLIENT
            LocomoteRenderMessage msg = RenderMessage.Create <LocomoteRenderMessage>();
            msg.ConstructAsStopMoving(GetOwnerEntityID(), false, LocomoteRenderMessage.NotFromCommand);
            GetLogicWorld().AddRenderMessage(msg);
#endif
        }
コード例 #17
0
ファイル: Effect.cs プロジェクト: mengflyQ/GameFrameWork
        public override void Run(LogicWorld logic_world, FixPoint current_time, FixPoint delta_time)
        {
            Entity entity = logic_world.GetEntityManager().GetObject(m_entity_id);

            if (entity == null)
            {
                return;
            }
            EffectRegistry registry = EntityUtil.GetEffectRegistry(entity);

            if (registry == null)
            {
                return;
            }
            registry.RemoveEffect(m_effect_id);
            LogicTask.Recycle(this);
        }
コード例 #18
0
        public override void Run(LogicWorld logic_world, FixPoint current_time, FixPoint delta_time)
        {
            Entity entity = logic_world.GetEntityManager().GetObject(m_entity_id);

            if (entity == null)
            {
                return;
            }
            DeathComponent death_component = entity.GetComponent(DeathComponent.ID) as DeathComponent;

            if (death_component != null)
            {
                death_component.ApplyDieGenerator();
            }
            logic_world.AddSimpleRenderMessage(RenderMessageType.Hide, m_entity_id);
            LogicTask.Recycle(this);
        }
コード例 #19
0
 protected override void ResetRuntimeData()
 {
     if (m_collision_target_generator != null)
     {
         SkillComponent skill_component = m_context.GetData <SkillComponent>(BTContextKey.OwnerSkillComponent);
         GetLogicWorld().GetEffectManager().DestroyGenerator(m_collision_target_generator.ID, skill_component.GetOwnerEntityID());
         m_collision_target_generator = null;
     }
     if (m_collided_targets != null)
     {
         m_collided_targets.Clear();
     }
     if (m_task != null)
     {
         m_task.Cancel();
         LogicTask.Recycle(m_task);
         m_task = null;
     }
     m_remain_time = FixPoint.Zero;
 }
コード例 #20
0
        protected override void OnDestruct()
        {
            EffectGenerator generator = GetLogicWorld().GetEffectManager().GetGenerator(m_generator_id);

            if (generator == null)
            {
                return;
            }
            EffectGeneratorEntry entry = generator.GetEntry(m_entry_index);

            if (entry == null)
            {
                return;
            }
            entry.RemoveEffect(ParentObject.ID);

            if (m_task != null)
            {
                m_task.Cancel();
                LogicTask.Recycle(m_task);
                m_task = null;
            }
        }
コード例 #21
0
        protected override void OnDestruct()
        {
            if (m_generator != null)
            {
                GetLogicWorld().GetEffectManager().DestroyGenerator(m_generator.ID, GetOwnerEntityID());
                m_generator = null;
            }
            if (m_delay_task != null)
            {
                m_delay_task.Cancel();
                LogicTask.Recycle(m_delay_task);
                m_delay_task = null;
            }

#if COMBAT_CLIENT
            if (m_render_delay_task != null)
            {
                m_render_delay_task.Cancel();
                LogicTask.Recycle(m_render_delay_task);
                m_render_delay_task = null;
            }
#endif
        }
コード例 #22
0
 public override void Run(LogicWorld logic_world, FixPoint current_time, FixPoint delta_time)
 {
     logic_world.GetEntityManager().DestroyObject(m_entity_id);
     LogicTask.Recycle(this);
 }