Beispiel #1
0
    public virtual IBuffEffect CreateBuffEffect(int effectID)
    {
        if (m_parent != null)
        {
            return(m_parent.CreateBuffEffect(effectID));
        }
        IBuffEffect eff = m_resultPool.GetObjectFromPool(effectID) as IBuffEffect;

        if (eff != null)
        {
            return(eff);
        }
        IBuffEffectFactory f = null;

        if (m_effectFactory.TryGetValue(effectID, out f))
        {
            return(f());
        }
        return(null);
    }
Beispiel #2
0
 public virtual void RegisterBuffEffect(int effectID, IBuffEffectFactory f)
 {
     m_effectFactory[effectID] = f;
 }