예제 #1
0
 public void Recycle()
 {
     if (pool == null)
     {
         //Debug.LogError("cant recycle because pool is not set");
         return;
     }
     connections.DisconnectAll();
     pool.Recycle(this);
 }
예제 #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);
    }
예제 #3
0
 private void OnDestroy()
 {
     Collerctor.DisconnectAll();
 }