Exemplo n.º 1
0
 public void Recycle()
 {
     if (pool == null)
     {
         //Debug.LogError("cant recycle because pool is not set");
         return;
     }
     connections.DisconnectAll();
     pool.Recycle(this);
 }
Exemplo n.º 2
0
    public static IDisposable WhateverBind <T>(this ICell <T> cell, Action <T, ConnectionCollector> action, Priority p = Priority.Normal)
    {
        var collector = new ConnectionCollector();
        var disps     = new ListDisposable
        {
            collector,
            cell.Bind(val =>
            {
                collector.DisconnectAll();
                action(val, collector);
            }, p)
        };

        return(disps);
    }
Exemplo n.º 3
0
 private void OnDestroy()
 {
     Collerctor.DisconnectAll();
 }