コード例 #1
0
        public GameSkillBase CreateSkill(long skillId, Action func)
        {
            GameSkillBase skillBase = null;
            ConfSkill     confSkill = ConfSkill.Get(skillId);

            if (confSkill == null)
            {
                Debug.LogError("skill is not exist: " + skillId);
                return(null);
            }
            if (types.ContainsKey(confSkill.type))
            {
                skillBase = Activator.CreateInstance(types[confSkill.type], skillId) as GameSkillBase;
                skillBase.SetOnEnd(func);
            }
            return(skillBase);
        }
コード例 #2
0
 protected virtual void InitCarryBase()
 {
     m_skillBase = GameSkillFactory.Instance.CreateSkill(m_skillID, OnEnd);
     m_skillBase.SetCarryBase(this);
 }