Class NavigationBackground
java.lang.Object
com.badlogic.gdx.scenes.scene2d.Actor
com.csse3200.game.components.spacenavigation.StarBackground
com.csse3200.game.components.spacenavigation.NavigationBackground
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.csse3200.game.components.spacenavigation.StarBackground
actMethods inherited from class com.badlogic.gdx.scenes.scene2d.Actor
addAction, addCaptureListener, addListener, ancestorsVisible, ascendantsVisible, clear, clearActions, clearListeners, clipBegin, clipBegin, clipEnd, debug, drawDebug, drawDebugBounds, fire, firstAscendant, getActions, getCaptureListeners, getColor, getDebug, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getUserObject, getWidth, getX, getX, getY, getY, getZIndex, hasActions, hasKeyboardFocus, hasParent, hasScrollFocus, hit, isAscendantOf, isDescendantOf, isTouchable, isTouchFocusListener, isTouchFocusTarget, isVisible, localToActorCoordinates, localToAscendantCoordinates, localToParentCoordinates, localToScreenCoordinates, localToStageCoordinates, moveBy, notify, parentToLocalCoordinates, positionChanged, remove, removeAction, removeCaptureListener, removeListener, rotateBy, rotationChanged, scaleBy, scaleBy, scaleChanged, screenToLocalCoordinates, setBounds, setColor, setColor, setDebug, setHeight, setName, setOrigin, setOrigin, setOriginX, setOriginY, setParent, setPosition, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setStage, setTouchable, setUserObject, setVisible, setWidth, setX, setX, setY, setY, setZIndex, sizeBy, sizeBy, sizeChanged, stageToLocalCoordinates, toBack, toFront, toString
-
Constructor Details
-
NavigationBackground
public NavigationBackground()
-
-
Method Details
-
starShift
protected com.badlogic.gdx.math.Vector2 starShift(int x, int y) Description copied from class:StarBackgroundShifts a star from the given x-y coordinates to new position. Can be used to draw bounding boxes around content or cluster stars.- Overrides:
starShiftin classStarBackground- Parameters:
x- The x coordinate of star to move.y- The y coordinate of the star to move.- Returns:
- A vector of the new position for the star.
-
draw
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float parentAlpha) Description copied from class:StarBackgroundCalled when the actor should be drawn. Draws the black background and the animated star sprites.- Overrides:
drawin classStarBackground- Parameters:
batch- The batch to draw with.parentAlpha- The parent alpha value.
-