Example #1
0
 // Generate New Item
 public CharacterInventoryItem(string _name, string _desc, DefinedItems _item, string _icon, int _lvl, bool _isWeapon, DefinedItems[] _weaponMags, string _action, Dictionary <string, object> _metaData)
 {
     this.Name        = _name;
     this.Description = _desc;
     this.DefinedItem = _item;
     this.Icon        = _icon;
     this.Level       = _lvl;
     this.IsWeapon    = _isWeapon;
     this.WeaponMags  = _weaponMags;
     this.Action      = _action;
     this.Data        = _metaData;
 }
Example #2
0
        public DungeonGameRules()
        {
            Floors     = new DefinedFloors();
            FloorTypes = TypeRegistry.CreateFrom(Floors, f => f.Mud);

            Walls     = new DefinedWalls();
            WallTypes = TypeRegistry.CreateFrom(Walls, w => w.None);

            Decorations     = new DefinedDecorations();
            DecorationTypes = TypeRegistry.CreateFrom(Decorations, d => d.None);

            var idGenerator = new IdGenerator(1);

            Characters = new DefinedCharacters(idGenerator);

            Items     = new DefinedItems(idGenerator);
            ItemTypes = TypeRegistry.CreateFrom <IItemType>(Items).AppendFrom(Characters);
        }