Ejemplo n.º 1
0
    public virtual void CreateSkillEffect(EffectCreateContext ctx)
    {
        SkillEffectType effectType = ctx.EffectType;

        switch (effectType)
        {
        case SkillEffectType.Damage:
        {
            m_effect = new EffectSDamage();
        }
        break;

        default:
        {
            Debug.LogError("Skill::CreateSkillEffect Effect Type Not Implement!!!");
        }
        break;
        }

        if (m_effect.Create(ctx) == false)
        {
            Debug.LogError("Skill::Create " + effectType + " Failed !!!");
        }

        m_effect.Start();
    }
Ejemplo n.º 2
0
    public void Create(InfoSkill info, Creature crt)
    {
        m_info      = info;
        m_owner_crt = crt;

        m_effects = new EffectBase[Proto.ProtoEffects.Length];
        for (int i = 0; i < m_effects.Length; ++i)
        {
            ProtoEffect proto = Proto.ProtoEffects[i];
            EffectBase  eb    = proto.NewInstance();
            eb.Create(proto, this, i);
            eb.OnActiveOver += OnEffectActiveOver;
            m_effects[i]     = eb;
        }
    }