Beispiel #1
0
        public void Setup(Dungeon.Dungeon dungeon, ItemDbEntry meta, bool spawnInWorld)
        {
            _dungeon = dungeon;
            _meta    = meta;
            if (meta.Interactions.Count > 0)
            {
                _interactions = new List <IInteractible>();
                foreach (var iMeta in meta.Interactions)
                {
                    if (iMeta is IInteractibleMeta interaction)
                    {
                        _interactions.Add(interaction.Create(this));
                    }
                }
            }

            if (spawnInWorld)
            {
                _worldView = dungeon.SpawnItemInWorld(this, meta);
            }
        }
Beispiel #2
0
 public void Drop(int2 position)
 {
     _worldView    = _dungeon.SpawnItemInWorld(this, _meta);
     WorldPosition = position;
 }