Ejemplo n.º 1
0
    public void Collect(BaseUnit unit)
    {
        List <BaseUnit> pool;

        if (unitPool.TryGetValue(unit.Type, out pool))
        {
            unit.CleanUp();
            pool.Add(unit);
        }
        else
        {
            Debug.Log("ComponentFactory:::Fail to return component back to pool;");
        }
    }