/// <summary> /// Load graphics content for the game. /// </summary> public override void LoadContent() { // Should speed up load times: content = ScreenManager.Game.Content; //Load Fonts gameFont = ScreenManager.Font[(int)ScreenManager.fontStyle.game14B]; //Load Sounds //Load Content for HUD powerBar1 = content.Load<Texture2D>("gamePlayScreen/HUD/health_bar1"); powerBar2 = content.Load<Texture2D>("gamePlayScreen/HUD/health_bar2"); powerBar3 = content.Load<Texture2D>("gamePlayScreen/HUD/health_bar3"); smallBeer = content.Load<Texture2D>("gamePlayScreen/HUD/corona"); paperBag = content.Load<Texture2D>("gamePlayScreen/HUD/paperBag"); trashBag = content.Load<Texture2D>("gamePlayScreen/HUD/trashBag"); cart = content.Load<Texture2D>("gamePlayScreen/HUD/cart"); HUDbackground1 = content.Load<Texture2D>("gamePlayScreen/HUD/horizontalBar"); HUDbackground2 = content.Load<Texture2D>("gamePlayScreen/HUD/verticalBar"); HUD = new gameplayHUD(HUDbackground1, HUDbackground2, powerBar1, powerBar2, powerBar3, smallBeer, Player.face, paperBag, trashBag, cart, gameFont, ScreenManager.GlobalOptions.SCREEN_WIDTH, ScreenManager.GlobalOptions.SCREEN_HEIGHT, Player); //Load Content for Mouse, Cursor, and Hands mouseCursor = content.Load<Texture2D>("cursor"); input.Viewport = new Rectangle(0, 0, ScreenManager.GraphicsDevice.Viewport.Width, ScreenManager.GraphicsDevice.Viewport.Height); // Create a debug texture for the mouses hitbox. blue = new Texture2D(ScreenManager.MyDevice, mouseCursor.Width, mouseCursor.Height, false, SurfaceFormat.Color); Int32[] toSet = new Int32[mouseCursor.Width * mouseCursor.Height]; for (int i = 0; i < (mouseCursor.Width * mouseCursor.Height); i++) { // Cornflower blue. toSet[i] = 0x6495ED; } blue.SetData<Int32>(toSet); hand_empty = content.Load<Texture2D>("gamePlayScreen/Hands/hand-point"); hand_glass = content.Load<Texture2D>("gamePlayScreen/Hands/hand-glass"); hand_plastic = content.Load<Texture2D>("gamePlayScreen/Hands/hand-plastic"); hand_can = content.Load<Texture2D>("gamePlayScreen/Hands/hand-can"); handPosition1 = new Vector2(input.Mouse.X, input.Mouse.Y); handPosition2 = new Vector2(input.Mouse.X, input.Mouse.Y); HAND = new playerHand(hand_empty, handPosition1); HAND2 = new playerHand(hand_empty, handPosition2); //Load Content for BLUR Visuals BLUR = new blur(1040, 580, new Vector2(0, 70), ScreenManager.GraphicsDevice, Player.VISUALS.stat[0], Player.VISUALS.stat[1]); //Load Content for Machines bottleCompoBG = new bottleBackground(3, new Vector2((int)(base.ScreenManager.GlobalOptions.SCREEN_WIDTH * backgroundScale), (int)(base.ScreenManager.GlobalOptions.SCREEN_HEIGHT * backgroundScale))); bottleCompoBG.Load(this.content, ScreenManager.MyDevice, false); bottleCompoBG_fade = new bottleBackground(bottleCompoBG); bottleCompoBG_fade.Load(this.content, ScreenManager.MyDevice, true); //Create button(s) btnShop = new Button(new Vector2(1060, 675), content.Load<Texture2D>("gamePlayScreen/shopButton"), content.Load<Texture2D>("gamePlayScreen/shopButtonMO"), content.Load<Texture2D>("gamePlayScreen/shopButton")); btnShop.Hide(); ScreenManager.Game.ResetElapsedTime(); Mouse.WindowHandle = base.ScreenManager.Game.Window.Handle; input.Viewport = new Rectangle(0, 0, ScreenManager.GraphicsDevice.Viewport.Width, ScreenManager.GraphicsDevice.Viewport.Height); }
public int getPlayerScore(player player) { playerHand hand = findPlayerHand(player); return(hand.getScore()); }
public List <string> getPlayerHand(player player) { playerHand hand = findPlayerHand(player); return(hand.getCardPrintStrings()); }
public void hitPlayer(player player) // Method to draw a card from the shoe and add it to a player's hand { playerHand handToHit = findPlayerHand(player); handToHit.addCard(shoeObj.dealCard()); }