Clear() public abstract method

public abstract Clear ( ) : bool
return bool
Ejemplo n.º 1
0
        private void EGMI_ACK_RECORD_CLEAR(int id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.MultiObjectRecordList xData = NFMsg.MultiObjectRecordList.Parser.ParseFrom(xMsg.MsgData);
            for (int i = 0; i < xData.MultiPlayerRecord.Count; ++i)
            {
                NFMsg.ObjectRecordList objectRecordList = xData.MultiPlayerRecord[i];
                for (int j = 0; j < objectRecordList.RecordList.Count; ++j)
                {
                    NFIObject go = mKernelModule.GetObject(mHelpModule.PBToNF(objectRecordList.PlayerId));
                    if (go == null)
                    {
                        Debug.LogError("error id" + objectRecordList.PlayerId);
                        return;
                    }

                    NFMsg.ObjectRecordBase objectRecordBase = objectRecordList.RecordList[j];
                    string           recordName             = objectRecordBase.RecordName.ToStringUtf8();
                    NFIRecordManager recordManager          = go.GetRecordManager();

                    if (recordManager != null)
                    {
                        NFIRecord record = recordManager.GetRecord(recordName);
                        if (record != null)
                        {
                            record.Clear();
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public override void Shut()
        {
            NFIDataList xRecordList = mRecordManager.GetRecordList();

            if (null != xRecordList)
            {
                for (int i = 0; i < xRecordList.Count(); ++i)
                {
                    string    strRecordName = xRecordList.StringVal(i);
                    NFIRecord xRecord       = mRecordManager.GetRecord(strRecordName);
                    if (null != xRecord)
                    {
                        xRecord.Clear();
                    }
                }
            }

            mRecordManager   = null;
            mPropertyManager = null;
            mHeartManager    = null;

            return;
        }