Example #1
0
        private void PCComponent_AddingComponent(object sender,
                                                 AddingComponentEventArgs e)
        {
            if (e.Data.GetComponent <MetaInfo>()?.SubTag != SubTag.PC)
            {
                return;
            }
            e.Data.AddComponent <ApplySkillFlawEffect>();
            e.Data.AddComponent <PCActiveAltar>();
            e.Data.AddComponent <PCAttackTarget>();
            e.Data.AddComponent <PCBuffSelf>();

            e.Data.AddComponent <PCBumpAttack>();
            e.Data.AddComponent <PCCheckTerrain>();
            e.Data.AddComponent <PCCurseTarget>();
            e.Data.AddComponent <PCMove>();

            e.Data.AddComponent <PCSkillManager>();
            e.Data.AddComponent <PCStartEndTurn>();
            e.Data.AddComponent <PCTeleportSelf>();
            e.Data.AddComponent <PCUseSKill>();
            e.Data.AddComponent <SkillCooldown>();

            e.Data.AddComponent <SkillDamage>();
            e.Data.AddComponent <SkillEffect>();
            e.Data.AddComponent <SkillMetaInfo>();
            e.Data.AddComponent <SkillRange>();
            e.Data.AddComponent <SkillSlot>();
        }
Example #2
0
 private void ActorComponent_AddingComponent(object sender,
                                             AddingComponentEventArgs e)
 {
     if (e.Data.GetComponent <MetaInfo>().MainTag == MainTag.Actor)
     {
         e.Data.AddComponent <HP>();
     }
 }
Example #3
0
 private void NPCComponent_AddingComponent(object sender,
                                           AddingComponentEventArgs e)
 {
     if (e.Data.GetComponent <MetaInfo>()?.SubTag != SubTag.Dummy)
     {
         return;
     }
     e.Data.AddComponent <DummyAI>();
 }
 private void ExamineMarkerComponent_AddingComponent(object sender,
                                                     AddingComponentEventArgs e)
 {
     if (e.Data.GetComponent <MetaInfo>().SubTag != SubTag.ExamineMarker)
     {
         return;
     }
     e.Data.AddComponent <ExamineMarkerPosition>();
     e.Data.AddComponent <MarkerCheckTerrain>();
     e.Data.AddComponent <PCMove>();
 }
 private void DungeonObjectComponent_AddingComponent(object sender,
                                                     AddingComponentEventArgs e)
 {
     if (e.Data.GetComponent <MetaInfo>().MainTag == MainTag.INVALID)
     {
         return;
     }
     e.Data.AddComponent <LocalManager>();
     e.Data.AddComponent <SubscribePathFinding>();
     e.Data.AddComponent <SubscribeSearch>();
 }
Example #6
0
 private void AimMarkerComponent_AddingComponent(object sender,
                                                 AddingComponentEventArgs e)
 {
     if (e.Data.GetComponent <MetaInfo>().SubTag != SubTag.AimMarker)
     {
         return;
     }
     e.Data.AddComponent <AimMarkerInputManager>().enabled = false;
     e.Data.AddComponent <AimMarkerInputSwitcher>();
     e.Data.AddComponent <AimMarkerPosition>();
     e.Data.AddComponent <MarkerCheckTerrain>();
     e.Data.AddComponent <PCMove>();
 }
Example #7
0
 private void NPCComponent_AddingComponent(object sender,
                                           AddingComponentEventArgs e)
 {
     if ((e.Data.GetComponent <MetaInfo>().MainTag != MainTag.Actor) ||
         (e.Data.GetComponent <MetaInfo>().SubTag == SubTag.PC))
     {
         return;
     }
     e.Data.AddComponent <NPCAI>();
     e.Data.AddComponent <NPCAttack>();
     e.Data.AddComponent <NPCBonusAction>();
     e.Data.AddComponent <NPCFindPath>();
     e.Data.AddComponent <NPCMove>();
 }
Example #8
0
        private void PCComponent_AddingComponent(object sender,
                                                 AddingComponentEventArgs e)
        {
            if (e.Data.GetComponent <MetaInfo>()?.SubTag != SubTag.PC)
            {
                return;
            }
            e.Data.AddComponent <PCCheckTerrain>();
            e.Data.AddComponent <PCInputManager>().enabled = false;
            e.Data.AddComponent <PCInputSwitcher>();

            e.Data.AddComponent <PCMove>();
            e.Data.AddComponent <PCSkillManager>();
            e.Data.AddComponent <PCStartEndTurn>();
            e.Data.AddComponent <PCUseSKill>();

            e.Data.AddComponent <SkillMetaInfo>();
            e.Data.AddComponent <SkillRange>();
        }
Example #9
0
 protected virtual void OnAddingComponent(AddingComponentEventArgs e)
 {
     AddingComponent?.Invoke(this, e);
 }