public void Remove(ThingInstance2D thing)
 {
     if (resources.ContainsKey(thing.Guid)) {
         GameObject.Destroy(resources[thing.Guid].gameObject);
         resources.Remove(thing.Guid);
         ThingLoader2D.Instance.Delete(thing);
     }
 }
    public void Add(ThingInstance2D thing)
    {
        if (resources.ContainsKey(thing.Guid)) {
            GameObject.Destroy(resources[thing.Guid].gameObject);
        }

        var instance = GameObjectUtil.GetResourceInstanceFromAttribute<SceneThing2D>();
        instance.Initialize(thing);
        ThingLoader2D.Instance.Save(instance);
        resources[thing.Guid] = instance;
    }
Пример #3
0
 public static List<DialogueSegment2D> Load(ThingInstance2D thing)
 {
     return Load(InteractionHostType.Thing, thing);
 }