uicomplete
This commit is contained in:
@@ -7,7 +7,7 @@ public class DataManager : UnitySingleton<DataManager>
|
||||
public bool isPlaying = false;
|
||||
List<SimulationModel> models = new List<SimulationModel>();
|
||||
|
||||
public event Action<List<SimulationModel>> onModelsUpdated;
|
||||
public event Action onModelsUpdated;
|
||||
public void AddModel(SimulationModel model)
|
||||
{
|
||||
if (models.Any(x => x == model))
|
||||
@@ -15,14 +15,14 @@ public class DataManager : UnitySingleton<DataManager>
|
||||
int objCount = models.FindAll(x => x.modelName.Contains(model.modelName)).Count;
|
||||
model.modelName = model.modelName + "_" + objCount.ToString();
|
||||
models.Add(model);
|
||||
onModelsUpdated?.Invoke(models);
|
||||
onModelsUpdated?.Invoke();
|
||||
}
|
||||
public void RemoveModel(SimulationModel model)
|
||||
{
|
||||
if (models.Any(x => x == model))
|
||||
return;
|
||||
models.Remove(model);
|
||||
onModelsUpdated?.Invoke(models);
|
||||
onModelsUpdated?.Invoke();
|
||||
}
|
||||
|
||||
public List<SimulationModel> GetModels()
|
||||
|
||||
Reference in New Issue
Block a user