Ejemplo n.º 1
0
    public void Update()
    {
        if (inGameCreateObjManager != null)
        {
            inGameCreateObjManager.Update();
        }
        if (inGameStoryMapManager != null)
        {
            inGameStoryMapManager.Update();
        }

        for (int i = 0; i < objList.Count; i++)
        {
            InGameBaseObj obj = objList[i];
            obj.ObjUpdate();

            if (obj.IsDie())
            {
                delList.Add(obj);
            }
        }

        for (int i = 0; i < delList.Count; i++)
        {
            InGameBaseObj obj = delList[i];
            objList.Remove(obj);
            obj.Die();
        }
        delList.Clear();

        if (addList.Count > 0)
        {
            objList.AddRange(addList);
            addList.Clear();
        }

        InGameManager.GetInstance().gamecamera.transform.position += new Vector3(0, Time.deltaTime, 0);
    }
Ejemplo n.º 2
0
    public void Update()
    {
        if (inGameCreateObjManager != null)
        {
            inGameCreateObjManager.Update();
        }
        if (inGameStoryMapManager != null)
        {
            inGameStoryMapManager.Update();
        }

        for (int i = 0; i < objList.Count; i++)
        {
            InGameBaseObj obj = objList[i];
            obj.ObjUpdate();

            if (obj.IsDie())
            {
                delList.Add(obj);
            }
        }

        for (int i = 0; i < delList.Count; i++)
        {
            InGameBaseObj obj = delList[i];
            objList.Remove(obj);
            obj.Die();
        }
        delList.Clear();

        if (addList.Count > 0)
        {
            objList.AddRange(addList);
            addList.Clear();
        }
    }