Example #1
0
 protected override void PostInitializeComponent()
 {
     if (m_die_with_master)
     {
         m_listener_context = SignalListenerContext.CreateForEntityComponent(GetLogicWorld().GenerateSignalListenerID(), ParentObject.ID, m_component_type_id);
     }
 }
 protected override void PostInitializeComponent()
 {
     if (m_attributes.Count > 0)
     {
         m_listener_context = SignalListenerContext.CreateForEntityComponent(GetLogicWorld().GenerateSignalListenerID(), ParentObject.ID, m_component_type_id);
         ParentObject.AddListener(SignalType.ChangeLevel, m_listener_context);
     }
 }
Example #3
0
 protected override void PostInitializeComponent()
 {
     m_target_gathering_param           = new TargetGatheringParam();
     m_target_gathering_param.m_type    = TargetGatheringType.SurroundingRing;
     m_target_gathering_param.m_param1  = m_guard_range;
     m_target_gathering_param.m_faction = FactionRelation.Enemy;
     m_targeting_component = ParentObject.GetComponent(TargetingComponent.ID) as TargetingComponent;
     if (m_targeting_component == null)
     {
         return;
     }
     m_listener_context = SignalListenerContext.CreateForEntityComponent(GetLogicWorld().GenerateSignalListenerID(), ParentObject.ID, m_component_type_id);
     Schedule();
 }
        protected override void PostInitializeComponent()
        {
            LogicWorld logic_world = GetLogicWorld();
            var        enumerator  = m_index2id.GetEnumerator();

            while (enumerator.MoveNext())
            {
                int skill_index = enumerator.Current.Key;
                int skill_cfgid = enumerator.Current.Value;
                CreateSkill(skill_index, skill_cfgid);
            }
            m_locomotor_cmp    = ParentObject.GetComponent(LocomotorComponent.ID) as LocomotorComponent;
            m_listener_context = SignalListenerContext.CreateForEntityComponent(logic_world.GenerateSignalListenerID(), ParentObject.ID, m_component_type_id);
            ParentObject.AddListener(SignalType.StartMoving, m_listener_context);
        }
Example #5
0
        protected override void PostInitializeComponent()
        {
            ResetSpawnAreaRange();
            if (m_update_interval < FixPoint.One)
            {
                m_update_interval = FixPoint.One;
            }
            m_listener_context = SignalListenerContext.CreateForEntityComponent(GetLogicWorld().GenerateSignalListenerID(), ParentObject.ID, m_component_type_id);
            m_task             = LogicTask.Create <ComponentCommonTask>();
            m_task.Construct(this);
            var schedeler = GetLogicWorld().GetTaskScheduler();

            schedeler.Schedule(m_task, GetCurrentTime(), m_update_interval, m_update_interval);
            for (int i = 0; i < m_init_count; ++i)
            {
                SpawnOneObject();
            }
        }