Exemple #1
0
 private void Command_Hold()
 {
     if (0 < FM.purchased[FM.Convert("hold")])
     {
         if (active_hold)
         {
             active_hold = false;
             if (container_hold[0] == "empty")
             {
                 container_hold    = container_current;
                 container_hold    = container_current;
                 container_current = container_next;
                 container_current = container_next;
                 container_next[0] = Domino_Roll();
                 container_next[1] = Domino_Roll();
             }
             else
             {
                 string[] temp = new string[2];
                 temp[0]              = container_hold[0];
                 temp[1]              = container_hold[1];
                 container_hold[0]    = container_current[0];
                 container_hold[1]    = container_current[1];
                 container_current[0] = temp[0];
                 container_current[1] = temp[1];
             }
             Domino_Create();
         }
     }
 }
Exemple #2
0
        public override void Draw2()
        {
            spriteBatch.Draw(SK.texture_background_tetris, SK.Position_DisplayEdge() + SK.Position_Tetris_Field(), Color.White);
            spriteBatch.Draw(SK.texture_static_tetris_next, SK.Position_DisplayEdge() + SK.Position_Tetris_Next(), Color.White);
            if (0 < FM.purchased[FM.Convert("hold")])
            {
                spriteBatch.Draw(SK.texture_static_tetris_hold, SK.Position_DisplayEdge() + SK.Position_Tetris_Hold(), Color.White);
            }
            spriteBatch.Draw(SK.texture_static_tetris_left, SK.Position_DisplayEdge() + SK.Position_Tetris_Left(), Color.White);
            spriteBatch.Draw(SK.texture_static_tetris_right, SK.Position_DisplayEdge() + SK.Position_Tetris_Right(), Color.White);

            for (int y = 0; y < 20; y++)
            {
                for (int x = 0; x < 10; x++)
                {
                    if (grid_base[x, y])
                    {
                        if (y == line1 || y == line2 || y == line3 || y == line4)
                        {
                            spriteBatch.Draw(SK.texture_spritesheet_minos_32x, SK.Position_DisplayEdge() + SK.Position_Tetris_Field() + new Vector2(32 * x, 32 * y), Get_Mino_Texture(TetroToMino(grid_color[x, y]), 0, 32), new Color(alpha, alpha, alpha));
                        }
                        else
                        {
                            spriteBatch.Draw(SK.texture_spritesheet_minos_32x, SK.Position_DisplayEdge() + SK.Position_Tetris_Field() + new Vector2(32 * x, 32 * y), Get_Mino_Texture(TetroToMino(grid_color[x, y]), 0, 32), Color.White);
                        }
                    }
                }
            }

            if (alpha == 255)
            {
                spriteBatch.Draw(SK.texture_spritesheet_minos_32x, SK.Position_DisplayEdge() + SK.Position_Tetris_Field() + tetromino[0] * 32, Get_Mino_Texture(TetroToMino(container_current), 0, 32), Color.White);
                spriteBatch.Draw(SK.texture_spritesheet_minos_32x, SK.Position_DisplayEdge() + SK.Position_Tetris_Field() + tetromino[1] * 32, Get_Mino_Texture(TetroToMino(container_current), 0, 32), Color.White);
                spriteBatch.Draw(SK.texture_spritesheet_minos_32x, SK.Position_DisplayEdge() + SK.Position_Tetris_Field() + tetromino[2] * 32, Get_Mino_Texture(TetroToMino(container_current), 0, 32), Color.White);
                spriteBatch.Draw(SK.texture_spritesheet_minos_32x, SK.Position_DisplayEdge() + SK.Position_Tetris_Field() + tetromino[3] * 32, Get_Mino_Texture(TetroToMino(container_current), 0, 32), Color.White);
            }

            if (container_next != "empty")
            {
                Get_Tetromino(SK.Position_DisplayEdge() + SK.Position_Tetris_Next() + new Vector2(16, 16), container_next);
            }
            if (container_hold != "empty" && 0 < FM.purchased[FM.Convert("hold")])
            {
                Get_Tetromino(SK.Position_DisplayEdge() + SK.Position_Tetris_Hold() + new Vector2(16, 16), container_hold);
            }
        }
Exemple #3
0
 private void Command_Hold()
 {
     if (0 < FM.purchased[FM.Convert("hold")])
     {
         if (active_hold)
         {
             active_hold = false;
             if (container_hold == "empty")
             {
                 container_hold    = container_current;
                 container_current = container_next;
                 container_next    = Tetromino_Roll();
             }
             else
             {
                 string temp;
                 temp              = container_hold;
                 container_hold    = container_current;
                 container_current = temp;
             }
             Tetromino_Create();
         }
     }
 }
Exemple #4
0
        public override string Update2()
        {
            if (ButtonPressed(GhostKey.button_function_P1) == GhostState.pressed)
            {
                pressed_response = true;
                if (betting)
                {
                    betting = false;
                    cards_player.Add(new Vector3(random.Next(13) + 1, random.Next(4), 400));
                    cards_player.Add(new Vector3(random.Next(13) + 1, random.Next(4), 400));
                    cards_dealer.Add(new Vector3(random.Next(13) + 1, random.Next(4), 400));
                    cards_dealer.Add(new Vector3(random.Next(13) + 1, random.Next(4), 400));
                    JK.Noise("CardStart");
                    hiddencard   = 400;
                    value_player = 0;
                    int ace = 0;
                    foreach (Vector3 v in cards_player)
                    {
                        if (v.X == 13)
                        {
                            ace++;
                        }
                        else if (v.X <= 9)
                        {
                            value_player = value_player + (int)v.X + 1;
                        }
                        else
                        {
                            value_player = value_player + 10;
                        }
                    }
                    if (ace > 0)
                    {
                        while (ace > 0)
                        {
                            if (value_player <= 10)
                            {
                                value_player = value_player + 11;
                            }
                            else
                            {
                                value_player = value_player + 1;
                            }
                            ace--;
                        }
                    }
                    if (value_player == 21)
                    {
                        end           = true;
                        active_player = false;
                        coins_plus    = bet * 2;
                    }
                }
            }
            if (ButtonPressed(GhostKey.button_ok_P1) == GhostState.pressed && !pressed_event_touch)
            {
                pressed_response = true;
                if (betting && !end)
                {
                    if (selector_bet == 0)
                    {
                        bet = bet - Get_Bet();
                        if (bet < 0)
                        {
                            bet = 0;
                        }
                    }
                    if (selector_bet == 1)
                    {
                        bet = bet + Get_Bet();
                        if (bet > coins_old)
                        {
                            bet = coins_old;
                        }
                    }
                }
                if (!betting && active_player)
                {
                    if (selector_card == 0)
                    {
                        Add_Card();
                    }
                    if (selector_card == 1)
                    {
                        active_player = false;
                    }
                }
            }
            if (ButtonPressed(GhostKey.arrow_up_P1) == GhostState.pressed)
            {
                pressed_response = true; if (betting)
                {
                    if (FM.purchased[FM.Convert("highroller")] == 1 ? betmulti < 4 : betmulti < 2)
                    {
                        betmulti++;
                    }
                }
            }
            if (ButtonPressed(GhostKey.arrow_down_P1) == GhostState.pressed)
            {
                pressed_response = true; if (betting)
                {
                    if (betmulti > 0)
                    {
                        betmulti--;
                    }
                }
            }
            if (ButtonPressed(GhostKey.arrow_left_P1) == GhostState.pressed)
            {
                pressed_response = true; if (betting)
                {
                    if (selector_bet > 0)
                    {
                        selector_bet--;
                    }
                }
                else
                {
                    if (selector_card > 0)
                    {
                        selector_card--;
                    }
                }
            }
            if (ButtonPressed(GhostKey.arrow_right_P1) == GhostState.pressed)
            {
                pressed_response = true; if (betting)
                {
                    if (selector_bet < 1)
                    {
                        selector_bet++;
                    }
                }
                else
                {
                    if (selector_card < 1)
                    {
                        selector_card++;
                    }
                }
            }
            if (ButtonPressed(GhostKey.button_ok_P1) != GhostState.released)
            {
                pressed_response = true;
                if (!betting && active_player)
                {
                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + SK.Collision_BlackJack_Hit().X, (int)SK.Position_DisplayEdge().Y + SK.Collision_BlackJack_Hit().Y, SK.Collision_BlackJack_Hit().Width, SK.Collision_BlackJack_Hit().Height)))
                    {
                        if (selector_card == 0)
                        {
                            Add_Card();
                        }
                        else
                        {
                            selector_card = 0;
                        }
                    }
                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + SK.Collision_BlackJack_Stand().X, (int)SK.Position_DisplayEdge().Y + SK.Collision_BlackJack_Stand().Y, SK.Collision_BlackJack_Stand().Width, SK.Collision_BlackJack_Stand().Height)))
                    {
                        if (selector_card == 1)
                        {
                            active_player = false;
                        }
                        else
                        {
                            selector_card = 1;
                        }
                    }
                }
                if (betting && !end)
                {
                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Minus().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Minus().Y, SK.texture_casino_bet_minus.Width, SK.texture_casino_bet_minus.Height)))
                    {
                        bet = bet - Get_Bet(); if (bet < 0)
                        {
                            bet = 0;
                        }
                        selector_bet = 0;
                    }
                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Plus().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Plus().Y, SK.texture_casino_bet_plus.Width, SK.texture_casino_bet_plus.Height)))
                    {
                        bet = bet + Get_Bet(); if (bet > coins_old)
                        {
                            bet = coins_old;
                        }
                        selector_bet = 1;
                    }

                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Up1().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Up1().Y, SK.texture_casino_bet_up.Width, SK.texture_casino_bet_up.Height)))
                    {
                        if (FM.purchased[FM.Convert("highroller")] == 1 ? betmulti < 4 : betmulti < 2)
                        {
                            betmulti++;
                        }
                    }
                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Up2().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Up2().Y, SK.texture_casino_bet_up.Width, SK.texture_casino_bet_up.Height)))
                    {
                        if (FM.purchased[FM.Convert("highroller")] == 1 ? betmulti < 4 : betmulti < 2)
                        {
                            betmulti++;
                        }
                    }
                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Down1().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Down1().Y, SK.texture_casino_bet_down.Width, SK.texture_casino_bet_down.Height)))
                    {
                        if (betmulti > 0)
                        {
                            betmulti--;
                        }
                    }
                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Down2().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Down2().Y, SK.texture_casino_bet_down.Width, SK.texture_casino_bet_down.Height)))
                    {
                        if (betmulti > 0)
                        {
                            betmulti--;
                        }
                    }
                }
            }
            if (control_mouse_new.LeftButton == ButtonState.Released && control_mouse_old.LeftButton == ButtonState.Released)
            {
                if (!betting && active_player)
                {
                    if (Collision_Button(true, new Rectangle((int)SK.Position_DisplayEdge().X + SK.Collision_BlackJack_Hit().X, (int)SK.Position_DisplayEdge().Y + SK.Collision_BlackJack_Hit().Y, SK.Collision_BlackJack_Hit().Width, SK.Collision_BlackJack_Hit().Height)))
                    {
                        selector_card = 0;
                    }
                    if (Collision_Button(true, new Rectangle((int)SK.Position_DisplayEdge().X + SK.Collision_BlackJack_Stand().X, (int)SK.Position_DisplayEdge().Y + SK.Collision_BlackJack_Stand().Y, SK.Collision_BlackJack_Hit().Width, SK.Collision_BlackJack_Hit().Height)))
                    {
                        selector_card = 1;
                    }
                }
                if (betting && !end)
                {
                    if (Collision_Button(true, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Minus().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Minus().Y, SK.texture_casino_bet_minus.Width, SK.texture_casino_bet_minus.Height)))
                    {
                        selector_bet = 0;
                    }
                    if (Collision_Button(true, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Plus().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Plus().Y, SK.texture_casino_bet_plus.Width, SK.texture_casino_bet_plus.Height)))
                    {
                        selector_bet = 1;
                    }
                }
            }
            return("void");
        }
Exemple #5
0
        public override string Update2()
        {
            if (move != 0)
            {
                if (movingIN)
                {
                    move += 5;
                    if (move == 165)
                    {
                        movingIN = false;
                        Sort();
                    }
                }
                else
                {
                    move -= 5;
                    if (move == 0)
                    {
                        Result();
                    }
                }
            }
            else if (active_transition)
            {
                if (transition_up)
                {
                    if (trans0 < 2.00f)
                    {
                        trans0 = trans0 + 0.05f;
                        if (betting)
                        {
                            trans1 = trans1 + 0.05f;
                            trans2 = trans2 + 0.05f;
                            trans3 = trans3 + 0.05f;
                            trans4 = trans4 + 0.05f;
                            trans5 = trans5 + 0.05f;
                        }
                        else
                        {
                            if (!hold1)
                            {
                                trans1 = trans1 + 0.05f;
                            }
                            if (!hold2)
                            {
                                trans2 = trans2 + 0.05f;
                            }
                            if (!hold3)
                            {
                                trans3 = trans3 + 0.05f;
                            }
                            if (!hold4)
                            {
                                trans4 = trans4 + 0.05f;
                            }
                            if (!hold5)
                            {
                                trans5 = trans5 + 0.05f;
                            }
                        }
                    }
                    else
                    {
                        transition_up     = false;
                        active_transition = false;
                        if (betting)
                        {
                            betting = false;
                        }
                        else
                        {
                            move    += 5;
                            movingIN = true;
                        }
                    }
                }
                else
                {
                    if (trans0 > 0.00f)
                    {
                        trans0 = trans0 - 0.05f;
                        if (betting)
                        {
                            trans1 = trans1 - 0.05f;
                            trans2 = trans2 - 0.05f;
                            trans3 = trans3 - 0.05f;
                            trans4 = trans4 - 0.05f;
                            trans5 = trans5 - 0.05f;
                        }
                        else
                        {
                            if (!hold1)
                            {
                                trans1 = trans1 - 0.05f;
                            }
                            if (!hold2)
                            {
                                trans2 = trans2 - 0.05f;
                            }
                            if (!hold3)
                            {
                                trans3 = trans3 - 0.05f;
                            }
                            if (!hold4)
                            {
                                trans4 = trans4 - 0.05f;
                            }
                            if (!hold5)
                            {
                                trans5 = trans5 - 0.05f;
                            }
                        }
                    }
                    else
                    {
                        transition_up = true;
                        if (!hold1)
                        {
                            card1 = new Vector2(random.Next(13) + 1, random.Next(4));
                        }
                        if (!hold2)
                        {
                            card2 = new Vector2(random.Next(13) + 1, random.Next(4));
                        }
                        if (!hold3)
                        {
                            card3 = new Vector2(random.Next(13) + 1, random.Next(4));
                        }
                        if (!hold4)
                        {
                            card4 = new Vector2(random.Next(13) + 1, random.Next(4));
                        }
                        if (!hold5)
                        {
                            card5 = new Vector2(random.Next(13) + 1, random.Next(4));
                        }
                    }
                }
            }
            else
            {
                if (ButtonPressed(GhostKey.button_function_P1) == GhostState.pressed)
                {
                    active_transition = true; pressed_response = true;
                }
                if (ButtonPressed(GhostKey.button_ok_P1) == GhostState.pressed && !pressed_event_touch)
                {
                    pressed_response = true;
                    if (betting && !end)
                    {
                        if (selector_bet == 0)
                        {
                            bet = bet - Get_Bet();
                            if (bet < 0)
                            {
                                bet = 0;
                            }
                        }
                        if (selector_bet == 1)
                        {
                            bet = bet + Get_Bet();
                            if (bet > coins_old)
                            {
                                bet = coins_old;
                            }
                        }
                    }
                    if (!betting && !end)
                    {
                        if (selector_hold == 1)
                        {
                            if (hold1)
                            {
                                hold1 = false;
                            }
                            else
                            {
                                hold1 = true;
                            }
                        }
                        if (selector_hold == 2)
                        {
                            if (hold2)
                            {
                                hold2 = false;
                            }
                            else
                            {
                                hold2 = true;
                            }
                        }
                        if (selector_hold == 3)
                        {
                            if (hold3)
                            {
                                hold3 = false;
                            }
                            else
                            {
                                hold3 = true;
                            }
                        }
                        if (selector_hold == 4)
                        {
                            if (hold4)
                            {
                                hold4 = false;
                            }
                            else
                            {
                                hold4 = true;
                            }
                        }
                        if (selector_hold == 5)
                        {
                            if (hold5)
                            {
                                hold5 = false;
                            }
                            else
                            {
                                hold5 = true;
                            }
                        }
                    }
                }
                if (ButtonPressed(GhostKey.arrow_up_P1) == GhostState.pressed)
                {
                    pressed_response = true; if (betting)
                    {
                        if (FM.purchased[FM.Convert("highroller")] == 1 ? betmulti < 4 : betmulti < 2)
                        {
                            betmulti++;
                        }
                    }
                }
                if (ButtonPressed(GhostKey.arrow_down_P1) == GhostState.pressed)
                {
                    pressed_response = true; if (betting)
                    {
                        if (betmulti > 0)
                        {
                            betmulti--;
                        }
                    }
                }
                if (ButtonPressed(GhostKey.arrow_left_P1) == GhostState.pressed)
                {
                    pressed_response = true; if (betting)
                    {
                        if (selector_bet > 0)
                        {
                            selector_bet--;
                        }
                    }
                    else
                    {
                        if (selector_hold > 1)
                        {
                            selector_hold--;
                        }
                    }
                }
                if (ButtonPressed(GhostKey.arrow_right_P1) == GhostState.pressed)
                {
                    pressed_response = true; if (betting)
                    {
                        if (selector_bet < 1)
                        {
                            selector_bet++;
                        }
                    }
                    else
                    {
                        if (selector_hold < 5)
                        {
                            selector_hold++;
                        }
                    }
                }
                if (ButtonPressed(GhostKey.button_ok_P1) != GhostState.released)
                {
                    pressed_response = true;
                    if (!betting)
                    {
                        if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_VideoPoker_Hold1().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_VideoPoker_Hold1().Y, 150, 500)))
                        {
                            selector_hold = 1; if (hold1)
                            {
                                hold1 = false;
                            }
                            else
                            {
                                hold1 = true;
                            }
                        }
                        if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_VideoPoker_Hold2().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_VideoPoker_Hold2().Y, 150, 500)))
                        {
                            selector_hold = 2; if (hold2)
                            {
                                hold2 = false;
                            }
                            else
                            {
                                hold2 = true;
                            }
                        }
                        if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_VideoPoker_Hold3().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_VideoPoker_Hold3().Y, 150, 500)))
                        {
                            selector_hold = 3; if (hold3)
                            {
                                hold3 = false;
                            }
                            else
                            {
                                hold3 = true;
                            }
                        }
                        if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_VideoPoker_Hold4().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_VideoPoker_Hold4().Y, 150, 500)))
                        {
                            selector_hold = 4; if (hold4)
                            {
                                hold4 = false;
                            }
                            else
                            {
                                hold4 = true;
                            }
                        }
                        if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_VideoPoker_Hold5().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_VideoPoker_Hold5().Y, 150, 500)))
                        {
                            selector_hold = 5; if (hold5)
                            {
                                hold5 = false;
                            }
                            else
                            {
                                hold5 = true;
                            }
                        }
                    }
                    else
                    {
                        if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Minus().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Minus().Y, SK.texture_casino_bet_minus.Width, SK.texture_casino_bet_minus.Height)))
                        {
                            bet = bet - Get_Bet(); if (bet < 0)
                            {
                                bet = 0;
                            }
                            selector_bet = 0;
                        }
                        if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Plus().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Plus().Y, SK.texture_casino_bet_plus.Width, SK.texture_casino_bet_plus.Height)))
                        {
                            bet = bet + Get_Bet(); if (bet > coins_old)
                            {
                                bet = coins_old;
                            }
                            selector_bet = 1;
                        }

                        if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Up1().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Up1().Y, SK.texture_casino_bet_up.Width, SK.texture_casino_bet_up.Height)))
                        {
                            if (FM.purchased[FM.Convert("highroller")] == 1 ? betmulti < 4 : betmulti < 2)
                            {
                                betmulti++;
                            }
                        }
                        if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Up2().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Up2().Y, SK.texture_casino_bet_up.Width, SK.texture_casino_bet_up.Height)))
                        {
                            if (FM.purchased[FM.Convert("highroller")] == 1 ? betmulti < 4 : betmulti < 2)
                            {
                                betmulti++;
                            }
                        }
                        if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Down1().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Down1().Y, SK.texture_casino_bet_down.Width, SK.texture_casino_bet_down.Height)))
                        {
                            if (betmulti > 0)
                            {
                                betmulti--;
                            }
                        }
                        if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Down2().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Down2().Y, SK.texture_casino_bet_down.Width, SK.texture_casino_bet_down.Height)))
                        {
                            if (betmulti > 0)
                            {
                                betmulti--;
                            }
                        }
                    }
                }
                if (control_mouse_new.LeftButton == ButtonState.Released && control_mouse_old.LeftButton == ButtonState.Released)
                {
                    if (!betting)
                    {
                        if (Collision_Button(true, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_VideoPoker_Hold1().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_VideoPoker_Hold1().Y, 150, 500)))
                        {
                            selector_hold = 1;
                        }
                        if (Collision_Button(true, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_VideoPoker_Hold2().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_VideoPoker_Hold2().Y, 150, 500)))
                        {
                            selector_hold = 2;
                        }
                        if (Collision_Button(true, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_VideoPoker_Hold3().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_VideoPoker_Hold3().Y, 150, 500)))
                        {
                            selector_hold = 3;
                        }
                        if (Collision_Button(true, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_VideoPoker_Hold4().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_VideoPoker_Hold4().Y, 150, 500)))
                        {
                            selector_hold = 4;
                        }
                        if (Collision_Button(true, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_VideoPoker_Hold5().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_VideoPoker_Hold5().Y, 150, 500)))
                        {
                            selector_hold = 5;
                        }
                    }
                    else
                    {
                        if (Collision_Button(true, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Minus().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Minus().Y, SK.texture_casino_bet_minus.Width, SK.texture_casino_bet_minus.Height)))
                        {
                            selector_bet = 0;
                        }
                        if (Collision_Button(true, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Plus().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Plus().Y, SK.texture_casino_bet_plus.Width, SK.texture_casino_bet_plus.Height)))
                        {
                            selector_bet = 1;
                        }
                    }
                }
            }
            return("void");
        }
Exemple #6
0
        public override string Update2()
        {
            if (ButtonPressed(GhostKey.button_function_P1) == GhostState.pressed)
            {
                Spin(); pressed_response = true;
            }
            if (ButtonPressed(GhostKey.arrow_up_P1) == GhostState.pressed)
            {
                pressed_response = true; if (!active_spin)
                {
                    if (FM.purchased[FM.Convert("highroller")] == 1 ? betmulti < 4 : betmulti < 2)
                    {
                        betmulti++;
                    }
                }
            }
            if (ButtonPressed(GhostKey.arrow_down_P1) == GhostState.pressed)
            {
                pressed_response = true; if (!active_spin)
                {
                    if (betmulti > 0)
                    {
                        betmulti--;
                    }
                }
            }
            if (ButtonPressed(GhostKey.arrow_left_P1) == GhostState.pressed)
            {
                pressed_response = true; if (!active_spin)
                {
                    if (selector_bet > 0)
                    {
                        selector_bet--;
                    }
                    else
                    {
                        if (multi > 1)
                        {
                            multi--; Change_Bet(1);
                        }
                    }
                }
            }
            if (ButtonPressed(GhostKey.arrow_right_P1) == GhostState.pressed)
            {
                pressed_response = true; if (!active_spin)
                {
                    if (selector_bet < 1)
                    {
                        selector_bet++;
                    }
                    else
                    {
                        if (multi < 5)
                        {
                            multi++; Change_Bet(2);
                        }
                    }
                }
            }
            if (ButtonPressed(GhostKey.button_ok_P1) == GhostState.pressed && !pressed_event_touch)
            {
                pressed_response = true;
                if (!active_spin && !end)
                {
                    Change_Bet(0);
                }
            }
            if (ButtonPressed(GhostKey.button_ok_P1) != GhostState.released)
            {
                pressed_response = true;
                if (!active_spin && !end)
                {
                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Minus().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Minus().Y, SK.texture_casino_bet_minus.Width, SK.texture_casino_bet_minus.Height)))
                    {
                        selector_bet = 0; Change_Bet(0);
                    }
                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Plus().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Plus().Y, SK.texture_casino_bet_plus.Width, SK.texture_casino_bet_plus.Height)))
                    {
                        selector_bet = 1; Change_Bet(0);
                    }

                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Up1().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Up1().Y, SK.texture_casino_bet_up.Width, SK.texture_casino_bet_up.Height)))
                    {
                        if (FM.purchased[FM.Convert("highroller")] == 1 ? betmulti < 4 : betmulti < 2)
                        {
                            betmulti++;
                        }
                    }
                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Up2().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Up2().Y, SK.texture_casino_bet_up.Width, SK.texture_casino_bet_up.Height)))
                    {
                        if (FM.purchased[FM.Convert("highroller")] == 1 ? betmulti < 4 : betmulti < 2)
                        {
                            betmulti++;
                        }
                    }
                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Down1().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Down1().Y, SK.texture_casino_bet_down.Width, SK.texture_casino_bet_down.Height)))
                    {
                        if (betmulti > 0)
                        {
                            betmulti--;
                        }
                    }
                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Down2().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Down2().Y, SK.texture_casino_bet_down.Width, SK.texture_casino_bet_down.Height)))
                    {
                        if (betmulti > 0)
                        {
                            betmulti--;
                        }
                    }
                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Left().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Left().Y, SK.texture_casino_bet_left.Width, SK.texture_casino_bet_left.Height)))
                    {
                        if (multi > 1)
                        {
                            multi--; Change_Bet(1);
                        }
                    }
                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Right().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Right().Y, SK.texture_casino_bet_right.Width, SK.texture_casino_bet_right.Height)))
                    {
                        if (multi < 5)
                        {
                            multi++; Change_Bet(2);
                        }
                    }
                }
            }
            if (control_mouse_new.LeftButton == ButtonState.Released && control_mouse_old.LeftButton == ButtonState.Released)
            {
                if (!active_spin && !end)
                {
                    if (Collision_Button(true, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Minus().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Minus().Y, SK.texture_casino_bet_minus.Width, SK.texture_casino_bet_minus.Height)))
                    {
                        selector_bet = 0;
                    }
                    if (Collision_Button(true, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Bet_Plus().X, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Bet_Plus().Y, SK.texture_casino_bet_plus.Width, SK.texture_casino_bet_plus.Height)))
                    {
                        selector_bet = 1;
                    }
                }
            }
            return("void");
        }