Beispiel #1
0
 internal void LoadTextures(ScreenManager ScreenManager)
 {
     controlstickBoundary = screenManager.Game.Content.Load<Texture2D>("Textures/controlstickBoundary");
     controlstick = screenManager.Game.Content.Load<Texture2D>("Textures/controlstick");
     smokeButton = ScreenManager.Game.Content.Load<Texture2D>("Textures/smokeBtn");
 }
Beispiel #2
0
 public ThumbStickLogic(ScreenManager screenManager)
 {
     this.screenManager = screenManager;
     controlstickBoundaryPosition = new Vector2(34, 347);
     controlstickStartupPosition = new Vector2(55, 369);
 }
Beispiel #3
0
        /// <summary>
        /// Draws the bomb button.
        /// </summary>
        internal void Draw(ScreenManager screenManager)
        {
            if (isSmokeButtonClicked)
            {
                screenManager.SpriteBatch.Draw(
                    smokeButton, new Rectangle((int) smokeButtonPosition.X, (int) smokeButtonPosition.Y, 109, 109),
                    new Rectangle(109, 0, 109, 109), Color.White);
            }
            else
            {
                screenManager.SpriteBatch.Draw(
                    smokeButton, new Rectangle((int) smokeButtonPosition.X, (int) smokeButtonPosition.Y, 109, 109),
                    new Rectangle(0, 0, 109, 109), Color.White);
            }

            screenManager.SpriteBatch.Draw(controlstickBoundary, controlstickBoundaryPosition, Color.White);
            screenManager.SpriteBatch.Draw(controlstick, controlstickStartupPosition, Color.White);
        }