Esempio n. 1
0
        public void Add(IGameInstances instance)
        {
            instance.Parent = this;
            if (Objects.FindIndex(v => v.name == instance.name) != -1)
            {
                throw new Exception($"Object with name {instance.name} already exists.");
            }
            else
            {
                if (instance.name == null)
                {
                    instance.name = "Unnamed Object " + Objects.Count;
                }

                Objects.Add(instance);
            }
        }
Esempio n. 2
0
 public void Remove(IGameInstances instance)
 {
     Remove(instance.name);
 }