public bool HasObject(int ID, CollectablesScript.collectType type) { foreach (Collect obj in m_Save.m_Collectables) { if (obj.m_Type == type && obj.m_ID == ID) return true; } return false; }
public Collect(int ID, CollectablesScript.collectType type) { //m_ForPerson = forPerson; m_Type = type; m_ID = ID; }
/* public void CollectCollect(Collect newcollect) { foreach (Collect collect in m_Save.m_Collectables) { if (collect.m_ID == newcollect.m_ID && collect.m_ForPerson == newcollect.m_ForPerson) { Debug.Log("Already had collect"); return; } } m_Save.m_Collectables.Add(newcollect); } */ public Collect GetCollectable(int ID, CollectablesScript.collectType type) { foreach (Collect obj in m_Save.m_Collectables) { if (obj.m_Type == type && obj.m_ID == ID) return obj; } return null; }