Esempio n. 1
0
    public void UnBind <T>(string name, Action <T> act)
    {
        IZEvent iz = null;

        if (dicNameEvent.TryGetValue(name, out iz))
        {
            (dicNameEvent[name] as OneParams <T>).actions -= act;
        }
    }
Esempio n. 2
0
    public void Fire <T>(string name, T t)
    {
        IZEvent iz = null;

        if (dicNameEvent.TryGetValue(name, out iz))
        {
            (dicNameEvent[name] as OneParams <T>)?.actions?.Invoke(t);
        }
    }
Esempio n. 3
0
    public void Fire(string name)
    {
        IZEvent iz = null;

        if (dicNameEvent.TryGetValue(name, out iz))
        {
            (dicNameEvent[name] as NonParams)?.actions?.Invoke();
        }
    }
Esempio n. 4
0
    public void UnBind(string name, Action act)
    {
        IZEvent iz = null;

        if (dicNameEvent.TryGetValue(name, out iz))
        {
            (dicNameEvent[name] as NonParams).actions -= act;
        }
    }
Esempio n. 5
0
    public void Fire <T, H>(string name, T t, H h)
    {
        IZEvent iz = null;

        if (dicNameEvent.TryGetValue(name, out iz))
        {
            (dicNameEvent[name] as TwoParams <T, H>)?.actions?.Invoke(t, h);
        }
    }
Esempio n. 6
0
    public void Bind <T>(string name, Action <T> act)
    {
        IZEvent iz = null;

        if (dicNameEvent.TryGetValue(name, out iz))
        {
            (dicNameEvent[name] as OneParams <T>).actions += act;
        }
        else
        {
            dicNameEvent[name] = new OneParams <T>(act);
        }
    }
Esempio n. 7
0
    public void Bind(string name, Action act)
    {
        IZEvent iz = null;

        if (dicNameEvent.TryGetValue(name, out iz))
        {
            (dicNameEvent[name] as NonParams).actions += act;
        }
        else
        {
            dicNameEvent[name] = new NonParams(act);
        }
    }