public CheckEnoughAuraToActivateSkillRule(ISystemContainer systemContainer)
 {
     entityEngine    = systemContainer.EntityEngine;
     skillSystem     = systemContainer.SkillSystem;
     prototypeSystem = systemContainer.PrototypeSystem;
     messageSystem   = systemContainer.MessageSystem;
 }
Beispiel #2
0
 public JobSystem(IGameResources gameResources, ISkillSystem skillSystem, IPlayerPacketFactory playerPacketFactory, ISpecialEffectPacketFactory specialEffectPacketFactory)
 {
     _gameResources              = gameResources;
     _skillSystem                = skillSystem;
     _playerPacketFactory        = playerPacketFactory;
     _specialEffectPacketFactory = specialEffectPacketFactory;
 }
Beispiel #3
0
        //-------------------------------------------------------------------------------------------------------
        // 游戏退出时使用
        public void Release()
        {
            if (m_LuaSystem != null)              // Lua系统
            {
                m_LuaSystem.Release();
                m_LuaSystem = null;
            }

            if (m_SkillSys != null)
            {
                m_SkillSys.Release();
                m_SkillSys = null;
            }

            if (m_EntitySys != null)           // 实体系统
            {
                m_EntitySys.Release();
                m_EntitySys = null;
            }

            // 技能系统
            if (m_ControllerSys != null)   // 控制器系统
            {
                m_ControllerSys.Release();
                m_ControllerSys = null;
            }

            if (m_MapSystem != null)              // 地图系统
            {
                m_MapSystem.Release();
                m_MapSystem = null;
            }

            // 游戏设置
            if (m_GameOption != null)
            {
                GameOption op = m_GameOption as GameOption;
                if (op != null)
                {
                    op.Close();
                }
            }
        }
Beispiel #4
0
        private IGameOption m_GameOption          = null; // 游戏设置



        //private float startTime = 0;

        /**
         * @brief
         * @param bEditor 编辑器使用
         */
        public void Init(bool bEditor = false)
        {
            if (m_LuaSystem == null)
            {
                //m_LuaSystem = LuaSystemCreator.CreateLuaSystem();
            }
            // 实体系统
            if (m_EntitySys == null)
            {
                m_EntitySys = EntitySystemCreator.CreateEntitySystem(this);
                m_EntitySys.Create();
            }

            if (m_SkillSys == null)
            {
                m_SkillSys = SkillSystemCreator.CreateSkillSystem(this);
                m_SkillSys.Init(bEditor);
            }
            if (m_MapSystem == null)
            {
                m_MapSystem = MapSystemCreator.CreateMapSystem(this, bEditor);
            }
            // 控制器
            if (m_ControllerSys == null)
            {
                m_ControllerSys = ControllerSystemCreator.CreateControllerSystem(this);
                m_ControllerSys.ActiveController(ControllerType.ControllerType_KeyBoard);
            }

            if (m_GameOption == null)
            {
                GameOption op = new GameOption();
                op.Create();
                m_GameOption = op;

                // 应用设置
                //op.ApplyOption();
            }
            //startTime = 0;
        }
Beispiel #5
0
 public SkillHandler(ILogger <SkillHandler> logger, ISkillSystem skillSystem, ISkillPacketFactory skillPacketFactory)
 {
     _logger             = logger;
     _skillSystem        = skillSystem;
     _skillPacketFactory = skillPacketFactory;
 }
Beispiel #6
0
        //-------------------------------------------------------------------------------------------------------
        public void AddPart(EntityPart enPart)
        {
            int entityPart = (int)enPart;

            if (m_Parts.ContainsKey(entityPart))
            {
                return;
            }

            switch (enPart)
            {
            case EntityPart.Skill:        // 技能
            {
                ISkillSystem skillSys = EntitySystem.m_ClientGlobal.GetSkillSystem();
                if (skillSys == null)
                {        //编辑器模式不需要
                    break;
                }
                ISkillPart skillPart = skillSys.CreateSkillPart();
                if (skillPart == null)
                {
                    return;
                }
                if (!skillPart.Create(this))
                {
                    Engine.Utility.Log.Error("AddPart failed!");
                    skillPart = null;
                    return;
                }
                m_Parts[entityPart] = skillPart;
                break;
            }

            case EntityPart.Buff:     // Buff
            {
                ISkillSystem skillSys = EntitySystem.m_ClientGlobal.GetSkillSystem();
                if (skillSys == null)
                {        //编辑器模式不需要
                    break;
                }
                IBuffPart buffpart = skillSys.CreateBuffPart();
                if (buffpart == null)
                {
                    return;
                }

                if (!buffpart.Create(this))
                {
                    Engine.Utility.Log.Error("AddPart failed!");
                    buffpart = null;
                    return;
                }
                m_Parts[entityPart] = buffpart;
                break;
            }

            case EntityPart.Equip:     // Equip 装备
            {
                IEquipPart equipPart = new EquipPart();
                if (equipPart == null)
                {
                    return;
                }

                if (!equipPart.Create(this))
                {
                    Engine.Utility.Log.Error("AddPart failed!");
                    equipPart = null;
                    return;
                }
                m_Parts[entityPart] = equipPart;
                break;
            }
            }
        }