Ejemplo n.º 1
0
        // Update is called once per frame
        virtual public void Update()
        {
            for (int i = 0; i < list.Count; ++i)
            {
                (list[i] as GameObject).transform.Translate(new Vector3(speed * Time.deltaTime, 0, 0));
            }
            GameObject g = list[0] as GameObject;

            if (g.transform.position.x < (-size.width() / 2f + (-offset.x / 2f)))
            {
                list.RemoveAt(0);
                if (need_refresh())
                {
                    pool.apply(g, getArgs());
                }
                apply_last(g);
            }
        }