public void changeBottleContents(int bottleNum, HUDOPTIONS content)
        {
            switch (content)
            {
            case HUDOPTIONS.EMPTY_BOTTLE:
                CMasterControl.buttonController.bottleRef[bottleNum].sprite   = new Graphics.CSprite(Graphics.CTextures.HUD_EMPTY_BOTTLE);
                CMasterControl.buttonController.bottleRef[bottleNum].MenuText = "Empty Bottle";
                break;

            case HUDOPTIONS.BLUE_POTION:
                CMasterControl.buttonController.bottleRef[bottleNum].sprite   = new Graphics.CSprite(Graphics.CTextures.HUD_BLUE_POTION);
                CMasterControl.buttonController.bottleRef[bottleNum].MenuText = "Blue Potion";
                break;

            case HUDOPTIONS.GREEN_POTION:
                CMasterControl.buttonController.bottleRef[bottleNum].sprite   = new Graphics.CSprite(Graphics.CTextures.HUD_GREEN_POTION);
                CMasterControl.buttonController.bottleRef[bottleNum].MenuText = "Green Potion";
                break;

            case HUDOPTIONS.RED_POTION:
                CMasterControl.buttonController.bottleRef[bottleNum].sprite   = new Graphics.CSprite(Graphics.CTextures.HUD_RED_POTION);
                CMasterControl.buttonController.bottleRef[bottleNum].MenuText = "Red Potion";
                break;

            default:
                throw new ArgumentException("Invalid bottle content added to bottle " + bottleNum);
            }

            CMasterControl.buttonController.bottleRef[bottleNum].hudOptions = content;
        }
Exemple #2
0
        public void changeItemOverlay(HUDOPTIONS option)
        {
            hudItem = option;
            switch (hudItem)
            {
            case HUDOPTIONS.ARROWS:
                _itemOverlay = new Graphics.CSprite(Graphics.CTextures.HUD_ARROWS);
                break;

            case HUDOPTIONS.BLUE_POTION:
                _itemOverlay = new Graphics.CSprite(Graphics.CTextures.HUD_BLUE_POTION);
                break;

            case HUDOPTIONS.BOMB_CANNON:
                _itemOverlay = new Graphics.CSprite(Graphics.CTextures.HUD_BOMB_CANNON);
                break;

            //place holder for now
            case HUDOPTIONS.BOOMERANG:
                _itemOverlay = new Graphics.CSprite(Graphics.CTextures.HUD_BOMB_CANNON);
                break;

            case HUDOPTIONS.GREEN_POTION:
                _itemOverlay = new Graphics.CSprite(Graphics.CTextures.HUD_GREEN_POTION);
                break;

            case HUDOPTIONS.EMPTY_BOTTLE:
                _itemOverlay = new Graphics.CSprite(Graphics.CTextures.HUD_EMPTY_BOTTLE);
                break;

            case HUDOPTIONS.FIRE_ARROWS:
                _itemOverlay = new Graphics.CSprite(Graphics.CTextures.HUD_ARROWS_FIRE);
                break;

            case HUDOPTIONS.ICE_ARROWS:
                _itemOverlay = new Graphics.CSprite(Graphics.CTextures.HUD_ARROWS_ICE);
                break;

            case HUDOPTIONS.RED_POTION:
                _itemOverlay = new Graphics.CSprite(Graphics.CTextures.HUD_RED_POTION);
                break;

            case HUDOPTIONS.SHADOW_MEDALLION:
                _itemOverlay = new Graphics.CSprite(Graphics.CTextures.HUD_SHADOW_MEDALLION);
                break;
            }
        }
 public void switchLeftItem(HUDOPTIONS item)
 {
     _buttonLeft.changeItemOverlay(item);
 }
 public void switchRightItem(HUDOPTIONS item)
 {
     _buttonRight.changeItemOverlay(item);
 }