Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Ability to change ball color is there, along with a few basic colors.
- Loading branch information
Showing
4 changed files
with
43 additions
and
6 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,27 @@ | ||
package game; | ||
|
||
import game.graphics.Texture; | ||
|
||
public class Options { | ||
|
||
public static boolean isWASD = true; | ||
private static int chosenBallColor = 0; | ||
|
||
private static Texture[] ballColors = new Texture[] { | ||
new Texture("res/playerBlue.png"), | ||
new Texture("res/playerRed.png"), | ||
new Texture("res/playerGreen.png"), | ||
}; | ||
|
||
public Options() { | ||
|
||
} | ||
|
||
public static void setBallColor(int newBallColor) { | ||
chosenBallColor = newBallColor; | ||
} | ||
|
||
public static Texture getBallTexture() { | ||
return ballColors[chosenBallColor]; | ||
} | ||
} |
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