예제 #1
0
 public ItemCreator(AbstractFactory factory)
 {
     _item1 = factory.CreateBasic();
     _item2 = factory.CreateMagic();
     PlaceInWorld();
 }
예제 #2
0
 public void RegisterWorldItems(IEquiptment item)
 {
     _worldItems.Add(item);
     Console.WriteLine($"You have placed {item}");
 }
예제 #3
0
 public void DeregisterWorldItems(IEquiptment item)
 {
     _worldItems.Remove(item);
 }
예제 #4
0
        public List <IEquiptment> BackPack = new List <IEquiptment>();          //Generic list of objects holding both weapons and defenses

        public void PickupItem(IEquiptment item)
        {
            BackPack.Add(item);
            Console.WriteLine($"You have found {item} You have placed it in your BackPack!");
        }