Beispiel #1
0
 public void LoadRestingButtons()
 {
     CurrentButtons.Clear();
     CurrentButtons.Add(Buttons["Reinforce Button"]);
     CurrentButtons.Add(Buttons["Green Ration Button"]);
     CurrentButtons.Add(Buttons["Heal Button"]);
 }
Beispiel #2
0
 /// <summary>
 /// Load Spells Buttons Method
 /// </summary>
 public void LoadSpellsButtons()
 {
     CurrentButtons.Clear();
     CurrentButtons.Add(Buttons["Green Fireball Spell Button"]);
     CurrentButtons.Add(Buttons["Green Ice Spell Button"]);
     CurrentButtons.Add(Buttons["Green Poison Spell Button"]);
     CurrentButtons.Add(Buttons["Green Healing Spell Button"]);
     //CurrentButtons.Add(Buttons["Done Button"]);
 }
Beispiel #3
0
 /// <summary>
 /// Load Merchant Buttons Method
 /// </summary>
 public void LoadMerchantButtons()
 {
     CurrentButtons.Clear();
     CurrentButtons.Add(Buttons["Green Ration Button"]);
     CurrentButtons.Add(Buttons["Green Health Potion Button"]);
     CurrentButtons.Add(Buttons["Green Big Health Potion Button"]);
     CurrentButtons.Add(Buttons["Green Armor Piece Button"]);
     CurrentButtons.Add(Buttons["Green Spells Button"]);
 }
Beispiel #4
0
        void ClearButtons()
        {
            for (var i = 0; i < CurrentButtons.Count; i++)
            {
                Destroy(CurrentButtons[i].gameObject);
            }

            CurrentButtons.Clear();
        }
Beispiel #5
0
        //---------------------- METHODS -----------------------------

        public override bool HandleCard(Player player, MouseState current, MouseState previous, float xPos, float yPos)
        {
            XPos = xPos;
            YPos = yPos;
            CurrentMouseState  = current;
            PreviousMouseState = previous;

            switch (eventCardTurnState)
            {
            case EventCardTurnState.INITIAL_ROLL:
                SkillCheck = false;
                HandleButtons(player);

                return(false);

            case EventCardTurnState.ROLLANIMATION:

                if (AnimationCounter < 60)
                {
                    RollAnimation();
                }
                else
                {
                    if (SkillCheck)
                    {
                        SkillCheckResult        = player.playerDice.RollDice();
                        EventDie.CurrentTexture = EventDie.DieTextures["Roll " + SkillCheckResult];
                        if (SkillCheckResult <= player.Rank)
                        {
                            CurrentButtons.Clear();
                            LoadSkillCheckButtons();
                            eventCardTurnState = EventCardTurnState.ADJUSTOPTION;
                        }
                        else
                        {
                            eventCardTurnState = EventCardTurnState.HANDLE_EVENT;
                        }
                        AnimationCounter = 0;
                    }
                    else
                    {
                        Option = player.playerDice.RollDice();
                        EventDie.CurrentTexture = EventDie.DieTextures["Roll " + Option];
                        LoadInitialRollButtons(Option);

                        eventCardTurnState = EventCardTurnState.SKILL_CHECK;
                        AnimationCounter   = 0;
                    }
                }



                return(false);

            case EventCardTurnState.SKILL_CHECK:

                HandleButtons(player);

                return(false);

            case EventCardTurnState.ADJUSTOPTION:

                HandleButtons(player);

                return(false);

            case EventCardTurnState.HANDLE_EVENT:

                HandleButtons(player);

                return(false);

            case EventCardTurnState.FIGHT_MONSTER:

                HandleButtons(player);


                return(false);

            case EventCardTurnState.COMBAT:

                if (CurrentCombat.HandleCombat(player, CurrentMouseState, PreviousMouseState, XPos, yPos, false, true))
                {
                    eventCardTurnState = EventCardTurnState.COMPLETE;
                }

                return(false);



            case EventCardTurnState.COMPLETE:

                return(true);

            default:
                return(false);
            }
        }