20 lines
497 B
C#
20 lines
497 B
C#
|
|
using UnityEngine;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using System.Linq;
|
||
|
|
public class DataManager : UnitySingleton<DataManager>
|
||
|
|
{
|
||
|
|
List<SimulationModel> models = new List<SimulationModel>();
|
||
|
|
public void AddModel(SimulationModel model)
|
||
|
|
{
|
||
|
|
if (models.Any(x => x == model))
|
||
|
|
return;
|
||
|
|
models.Add(model);
|
||
|
|
}
|
||
|
|
public void RemoveModel(SimulationModel model)
|
||
|
|
{
|
||
|
|
if (models.Any(x => x == model))
|
||
|
|
return;
|
||
|
|
models.Remove(model);
|
||
|
|
}
|
||
|
|
}
|