예제 #1
0
    //清除所有CObject派生对象  [3/7/2012 ZZY]
    public void Clear()
    {
        List <CObject> delObject = new List <CObject>();

        foreach (int k in mServerObjects.Keys)
        {
            CObject obj = mServerObjects[k];
            if (obj.GetFakeObjectFlag() == false)
            {
                delObject.Add(mServerObjects[k]);
            }
        }
        foreach (CObject obj in delObject)
        {
            DestroyObject(obj);
        }
        DestroyObject(mPlayerMySelf);
        mPlayerMySelf = null;
    }