Ejemplo n.º 1
0
Archivo: Buff.cs Proyecto: spock254/sza
    // игнорировать если айтем существует
    public void BuffDirty()
    {
        if (eventController == null)
        {
            eventController = Global.Component.GetEventController();
        }

        if (buffController == null)
        {
            buffController = Global.Component.GetBuffController();
        }

        Type  type = Type.GetType(buffType.ToString());
        IBuff buff = (IBuff)Activator.CreateInstance(type);

        buff.Buff();
    }
Ejemplo n.º 2
0
Archivo: Buff.cs Proyecto: spock254/sza
    public void BuffActivate(Item item)
    {
        if (eventController == null)
        {
            eventController = Global.Component.GetEventController();
        }

        if (buffController == null)
        {
            buffController = Global.Component.GetBuffController();
        }

        if (buffController.IsBuffExist(item) == false)
        {
            Type  type = Type.GetType(buffType.ToString());
            IBuff buff = (IBuff)Activator.CreateInstance(type);
            buff.Buff();
        }

        eventController.OnAddBuffEvent.Invoke(item);
    }