2021-02-14 16:08:59 +01:00
|
|
|
using System;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
2021-02-19 16:14:14 +01:00
|
|
|
public class ArtefactInventory : ScriptableObject
|
2021-02-14 16:08:59 +01:00
|
|
|
{
|
|
|
|
public static List<Artefact> artefactList = new List<Artefact>();
|
|
|
|
private static bool exists = false;
|
|
|
|
|
|
|
|
public static void addA(Artefact a)
|
|
|
|
{
|
|
|
|
//check if duplicate in the list
|
|
|
|
exists = false;
|
|
|
|
foreach (Artefact x in artefactList)
|
|
|
|
{
|
|
|
|
if (x.artefactID == a.artefactID)
|
|
|
|
exists = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( exists == false)
|
|
|
|
{
|
|
|
|
artefactList.Add(a);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|