private void DeleteNPC(NPCData _npc) { if (DataMart.CheckNPC(_npc.ID)) { DataMart.RemoveNPC(_npc); } else { Debug.LogError("NPC doesnt exist"); } }
public void LoadNPC(int id) { if (DataMart.CheckNPC(id)) { NPCData data = DataMart.GetNPC(id); RefreshUI(data); } else { Debug.LogError("Cannot load, NPC not found."); } }
private void SaveNPC(NPCData _npc) { _npc.Name = NPCName.text; _npc.URI = PortraitURI.text; if (DataMart.CheckNPC(_npc.ID)) { DataMart.RemoveNPC(_npc); DataMart.AddNPC(_npc); } else { DataMart.AddNPC(_npc); } }
private void Start() { if (IDKEY >= 0) { //Is not a negative number if (DataMart.CheckNPC(IDKEY)) { NPCData data = DataMart.GetNPC(IDKEY); npcname = data.Name; uri = data.URI; } } else { Debug.LogError("ID is a negative number"); } }