Esempio n. 1
0
        // Add item
        public override void AddItems()
        {
            // Items in this area are always the same
            RedGem redGem = new RedGem();

            Items.Add(redGem);
        }
Esempio n. 2
0
        // Persuade

        // Pick pocket

        // Decorate weapon
        public bool DecorateWeapon(WeaponDecorator wpnDecorator,
                                   AbstractWeapon weapon)
        {
            AbstractWeapon newWeapon;

            if (weapon is WeaponDecorator)
            {
                //cant decorate
                return(false);
            }
            else if (wpnDecorator is RedGem)
            {
                //// Decorate fire weapon
                //newWeapon = new RedGem(weapon);
                //Inventory.Push(newWeapon);
                //Render.UpdateItemFeed(this);

                Inventory = new Stack <IItem>();
                // Decorate fire weapon
                newWeapon = new RedGem(weapon);
                Inventory.Push(newWeapon);
                Render.UpdateItemFeed(this);

                return(true);

                // Add other items to inventory
            }
            else if (wpnDecorator is BlueGem)
            {
                Inventory = new Stack <IItem>();

                newWeapon = new BlueGem(weapon);
                Inventory.Push(newWeapon);
                Render.UpdateItemFeed(this);

                return(true);

                // Add other items to inventory
            }
            else if (wpnDecorator is GreenGem)
            {
                Inventory = new Stack <IItem>();

                newWeapon = new GreenGem(weapon);
                Inventory.Push(newWeapon);
                Render.UpdateItemFeed(this);

                return(true);

                // Add the deleted items
            }
            // Other decorations

            return(false);
        }