Package com.sprites

Class MinigameSprite


  • public class MinigameSprite
    extends SimpleSprite
    This sprite can be located around the map and when a player drives over it, the mini game will begin
    • Constructor Summary

      Constructors 
      Constructor Description
      MinigameSprite​(float x, float y, java.util.ArrayList<com.badlogic.gdx.graphics.Texture> tex)
      Constructor for minigame sprite
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.badlogic.gdx.math.Polygon getHitBox()  
      void update​(com.badlogic.gdx.graphics.g2d.Batch batch)
      Draw the sprite
      • Methods inherited from class com.badlogic.gdx.graphics.g2d.Sprite

        draw, draw, flip, getBoundingRectangle, getColor, getOriginX, getOriginY, getRotation, getScaleX, getScaleY, getVertices, getX, getY, rotate90, scale, scroll, set, setAlpha, setBounds, setCenter, setCenterX, setCenterY, setColor, setColor, setFlip, setOrigin, setOriginBasedPosition, setOriginCenter, setPackedColor, setPosition, setRegion, setRotation, setScale, setScale, setU, setU2, setV, setV2, setX, setY, translate, translateX, translateY
      • Methods inherited from class com.badlogic.gdx.graphics.g2d.TextureRegion

        getRegionHeight, getRegionWidth, getRegionX, getRegionY, getTexture, getU, getU2, getV, getV2, isFlipX, isFlipY, setRegion, setRegion, setRegion, setRegion, setRegionHeight, setRegionWidth, setRegionX, setRegionY, setTexture, split, split
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MinigameSprite

        public MinigameSprite​(float x,
                              float y,
                              java.util.ArrayList<com.badlogic.gdx.graphics.Texture> tex)
        Constructor for minigame sprite
        Parameters:
        x - coordinate where the sprite spawns
        y - coordinate where the sprite spawns
        tex - The textures of the flames
    • Method Detail

      • update

        public void update​(com.badlogic.gdx.graphics.g2d.Batch batch)
        Draw the sprite
        Overrides:
        update in class SimpleSprite
        Parameters:
        batch - to be drawn to
      • getHitBox

        public com.badlogic.gdx.math.Polygon getHitBox()