Skip to content

Commit

Permalink
Set-up for issue #2
Browse files Browse the repository at this point in the history
  • Loading branch information
dljve committed May 29, 2017
1 parent eab9420 commit 0743f35
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions core/src/com/applab/wordwar/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ private void captureTile(Rectangle tile) {
*/
public Color getTileColor(Rectangle tile) {
int[] c = captures.get(tile);
float r, g, b;

// Get the default color for the captured state
Color col = color[c[0]][c[1]][c[2]];
Expand All @@ -339,6 +340,26 @@ public Color getTileColor(Rectangle tile) {
opacity = col.a;
}

/*
// apply activation scale if captured
if (c[PLAYER_ID] == 1) {
int i = tiles.indexOf(tile);
//app.getClient().getGameModel().
// current in int array for tile ids
// current = max(0,current+0.5)
// s = current/(A+0.5)
float s = 0.5f;
r = 1-s*(1-col.r);
g = 1-s*(1-col.g);
b = 1-s*(1-col.b);
} else {
r = col.r;
g = col.g;
b = col.b;
}
*/

return new Color(col.r, col.g, col.b, opacity);
}

Expand Down

0 comments on commit 0743f35

Please sign in to comment.