mirror of
https://github.com/OpenLiberty/liberty-bikes.git
synced 2025-01-30 10:40:13 +08:00
Merge pull request #99 from aguibert/player-color-scheme
Update player colors to orange/green/blue/purple
This commit is contained in:
commit
b5b3074d4e
@ -13,7 +13,7 @@ export class PlayerTooltip {
|
|||||||
constructor(public player: Player) {
|
constructor(public player: Player) {
|
||||||
if (!this.player.color)
|
if (!this.player.color)
|
||||||
console.log('WARNING: Creating a tooltip with a player that is not properly initialized');
|
console.log('WARNING: Creating a tooltip with a player that is not properly initialized');
|
||||||
this.nameText = new Text(this.player.name, "28px Arial", "#fff");
|
this.nameText = new Text(this.player.name, "28px Arial", "#000");
|
||||||
this.nameText.textAlign = 'center';
|
this.nameText.textAlign = 'center';
|
||||||
this.nameText.maxWidth = 200;
|
this.nameText.maxWidth = 200;
|
||||||
this.shape.graphics.beginFill(this.player.color)
|
this.shape.graphics.beginFill(this.player.color)
|
||||||
|
@ -62,13 +62,13 @@ public class Player {
|
|||||||
if (playerNum >= MAX_PLAYERS)
|
if (playerNum >= MAX_PLAYERS)
|
||||||
throw new IllegalArgumentException("Cannot create player number " + playerNum + " because MAX_PLAYERS=" + MAX_PLAYERS);
|
throw new IllegalArgumentException("Cannot create player number " + playerNum + " because MAX_PLAYERS=" + MAX_PLAYERS);
|
||||||
if (playerNum == 0) {
|
if (playerNum == 0) {
|
||||||
color = "#DF740C";
|
color = "#f28415"; // orange
|
||||||
} else if (playerNum == 1) {
|
} else if (playerNum == 1) {
|
||||||
color = "#FF0000";
|
color = "#ABD155"; // bright green
|
||||||
} else if (playerNum == 2) {
|
} else if (playerNum == 2) {
|
||||||
color = "#6FC3DF";
|
color = "#6FC3DF"; // light blue
|
||||||
} else {
|
} else {
|
||||||
color = "#FFE64D";
|
color = "#c178c9"; // light purple
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ import org.libertybikes.game.core.Obstacle;
|
|||||||
|
|
||||||
public class GameMap {
|
public class GameMap {
|
||||||
|
|
||||||
public static final int NUM_MAPS = 4; // Not including empty map
|
public static final int NUM_MAPS = 5; // Not including empty map
|
||||||
private static final Random r = new Random();
|
private static final Random r = new Random();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user