Example #1
0
        public override string Update2()
        {
            if (ButtonPressed(GhostKey.button_function_P1) == GhostState.pressed)
            {
                if (!active_gameover)
                {
                    Command_Unlock();
                }
                pressed_response = true;
            }
            if (ButtonPressed(GhostKey.button_ok_P1) == GhostState.pressed && !pressed_event_touch)
            {
                if (!active_gameover)
                {
                    Command_Click();
                }
                pressed_response = true;
            }
            if (ButtonPressed(GhostKey.arrow_up_P1) == GhostState.pressed)
            {
                if (selector.Y == 1)
                {
                    selector.Y--;
                }
                pressed_response = true;
            }
            if (ButtonPressed(GhostKey.arrow_down_P1) == GhostState.pressed)
            {
                if (selector.Y == 0)
                {
                    selector.Y++;
                }
                pressed_response = true;
            }
            if (ButtonPressed(GhostKey.arrow_left_P1) == GhostState.pressed)
            {
                if (selector.X > 0)
                {
                    selector.X--;
                }
                pressed_response = true;
            }
            if (ButtonPressed(GhostKey.arrow_right_P1) == GhostState.pressed)
            {
                if (selector.X < 5)
                {
                    selector.X++;
                }
                pressed_response = true;
            }

            if (pressed_event_touch)
            {
                for (int i = 0; i < 6; i++)
                {
                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Mastermind_Lamps().X + 71 * i, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Mastermind_Lamps().Y + 350, 71, 71)))
                    {
                        selector = new Vector2(i, 0); Command_Click();
                    }
                    if (Collision_Button(false, new Rectangle((int)SK.Position_DisplayEdge().X + (int)SK.Position_Mastermind_Lamps().X + 71 * i, (int)SK.Position_DisplayEdge().Y + (int)SK.Position_Mastermind_Lamps().Y + 470, 71, 71)))
                    {
                        selector = new Vector2(i, 1); Command_Click();
                    }
                }
            }

            return("null");
        }
Example #2
0
        public override void Draw2()
        {
            //spriteBatch.Draw(SK.texture_background_mastermind1, SK.Position_DisplayEdge() + SK.Position_Mastermind1(), Color.White);

            for (int i = 0; i < 6; i++)
            {
                int y = 0;
                if (lamp[i] == "green")
                {
                    y = 3;
                }
                if (lamp[i] == "yellow")
                {
                    y = 2;
                }
                if (lamp[i] == "red")
                {
                    y = 1;
                }
                spriteBatch.Draw(SK.texture_spritesheet_lamps, SK.Position_DisplayEdge() + new Vector2(SK.Position_Mastermind_Lamps().X + 71 * i, SK.Position_Mastermind_Lamps().Y), new Rectangle(0, 64 * y, 64, 64), Color.White, 0, new Vector2(0, 0), 1, SpriteEffects.None, 0);

                spriteBatch.Draw(SK.texture_casino_bet_up, SK.Position_DisplayEdge() + new Vector2(SK.Position_Mastermind_Lamps().X + 71 * i - 45, SK.Position_Mastermind_Lamps().Y + 350), null, selector == new Vector2(i, 0) ? Color.Gold : Color.White, 0, new Vector2(0, 0), 1, SpriteEffects.None, 0);
                spriteBatch.Draw(SK.texture_spritesheet_minos_64x, SK.Position_DisplayEdge() + new Vector2(SK.Position_Mastermind_Lamps().X + 71 * i, SK.Position_Mastermind_Lamps().Y + 400), Get_Mino_Texture(slot[i], "middle"), Color.White, 0, new Vector2(0, 0), 1, SpriteEffects.None, 0);
                spriteBatch.Draw(SK.texture_casino_bet_down, SK.Position_DisplayEdge() + new Vector2(SK.Position_Mastermind_Lamps().X + 71 * i - 45, SK.Position_Mastermind_Lamps().Y + 470), null, selector == new Vector2(i, 1) ? Color.Gold : Color.White, 0, new Vector2(0, 0), 1, SpriteEffects.None, 0);

                //spriteBatch.Draw(SK.texture_spritesheet_minos_64x, new Vector2(429 + 138 * i, 303), Get_Mino_Texture(slot[i], "upper"), Color.White, 0, new Vector2(0, 0), 2, SpriteEffects.None, 0);
                //spriteBatch.Draw(SK.texture_spritesheet_minos_64x, new Vector2(429 + 138 * i, 439), Get_Mino_Texture(slot[i], "lower"), Color.White, 0, new Vector2(0, 0), 2, SpriteEffects.None, 0);
                //spriteBatch.Draw(SK.texture_spritesheet_minos_64x, new Vector2(429 + 138 * i, 371), Get_Mino_Texture(slot[i], "middle"), Color.White, 0, new Vector2(0, 0), 2, SpriteEffects.None, 0);
            }
            //spriteBatch.Draw(SK.texture_background_mastermind2, SK.Position_DisplayEdge() + SK.Position_Mastermind2(), Color.White);
        }