-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Main Menu Screen - Added title, fixed resizing issue & reduce redundancy
- Loading branch information
1 parent
bcc94d0
commit f5dc0a6
Showing
4 changed files
with
138 additions
and
176 deletions.
There are no files selected for viewing
Binary file modified
BIN
-8.89 KB
(100%)
source/core/assets/images/background/main_menu/main_menu_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
source/core/src/main/com/csse3200/game/screens/AnimationTexturePair.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/** | ||
* Represents a pair of animation and texture for rendering in a game screen. | ||
* Provides easy access to the animation and its associated texture. | ||
* | ||
* @param <TextureRegion> The type of texture region used in the animation. | ||
*/ | ||
package com.csse3200.game.screens; | ||
|
||
import com.badlogic.gdx.graphics.Texture; | ||
import com.badlogic.gdx.graphics.g2d.Animation; | ||
import com.badlogic.gdx.graphics.g2d.TextureRegion; | ||
|
||
public class AnimationTexturePair { | ||
public final Animation<TextureRegion> animation; | ||
public final Texture texture; | ||
|
||
/** | ||
* Creates an {@code AnimationTexturePair} with the specified animation and texture. | ||
* | ||
* @param animation The animation to be associated with this pair. | ||
* @param texture The texture to be associated with this pair. | ||
*/ | ||
public AnimationTexturePair(Animation<TextureRegion> animation, Texture texture) { | ||
this.animation = animation; | ||
this.texture = texture; | ||
} | ||
|
||
/** | ||
* Gets the animation associated with this pair. | ||
* | ||
* @return The animation. | ||
*/ | ||
public Animation<TextureRegion> getAnimation() { | ||
return animation; | ||
} | ||
|
||
/** | ||
* Gets the texture associated with this pair. | ||
* | ||
* @return The texture. | ||
*/ | ||
public Texture getTexture() { | ||
return texture; | ||
} | ||
} |
Oops, something went wrong.