/// <summary> /// 添加证据 /// </summary> /// <param name="exhibitID">证物id</param> public void AddEvidence(string exhibitID) { if (MyEvidenceDic.ContainsKey(exhibitID))// 已经存在 { return; } if (m_evidenceConfig.ContainsKey(exhibitID)) { EvidenceConfig.Detail data = m_evidenceConfig[exhibitID]; m_data.evidenceList.Add(exhibitID, new SingleEvidenceData(data.exhibitID, data.exhibit, data.description, data.exhibitImageName)); MyEvidenceDic.Add(exhibitID, new SingleEvidenceData(data.exhibitID, data.exhibit, data.description, data.exhibitImageName)); //SaveData(); } #if UNITY_EDITOR else { Debug.LogError("evidence id " + exhibitID + " not contain in exhibitTable!"); } #endif }
/// <summary> /// 添加证据 /// </summary> /// <param name="vId"></param> public void AddEvidence(string vExhibit) { if (myEvidenceDic.ContainsKey(vExhibit))// 已经存在 { return; } if (m_evidenceConfig.ContainsKey(vExhibit)) { //m_data.evidenceList.Add(vExhibit); EvidenceConfig.Detail data = m_evidenceConfig[vExhibit]; m_data.evidenceList.Add(vExhibit, new SingleEvidenceData(/*data.id, */ data.exhibit, data.description)); myEvidenceDic.Add(vExhibit, new SingleEvidenceData(/*data.id, */ data.exhibit, data.description)); SaveData(); } #if UNITY_EDITOR else { Debug.Log("evidence id not contain in exhibitTable!"); } #endif }