Skip to content

Commit a0cee99

Browse files
committed
Fixed iron curtain icon available and activated state
1 parent 4f54540 commit a0cee99

3 files changed

Lines changed: 28 additions & 12 deletions

File tree

Assets/EC2018/ColorUtil.cs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,25 @@
44

55
public static class ColorUtil {
66

7-
public static Color playerA = new Color(1f, 0f, 0f);
7+
public static Color playerA = new Color(0.96f, 0.26f, 0.21f);
8+
public static Color playerA_light = new Color(0.5f, 0.1f, 0.1f);
89

9-
public static Color playerB = new Color(0f, 0f, 0.5f);
10+
public static Color playerB = new Color(0.13f, 0.59f, 0.95f);
11+
public static Color playerB_light = new Color(0.1f, 0.3f, 0.5f);
12+
13+
public static Color yellow = new Color(1f, 0.9f, 0.05f);
14+
15+
public static Color orange = new Color(1f, 0.6f, 0f);
1016

1117
public static Color lightGrey = new Color(0.7f, 0.7f, 0.7f);
1218

1319
public static Color white = Color.white;
1420

1521

16-
// Entelect colours - Hex - RGB
17-
// Blue - #2196f3 - 33, 150, 243
18-
// Red - #f44336 - 244, 67, 54
19-
// Yellow - #fee50e - 254, 229, 14
20-
// Oraneg - #ff9800 - 255, 152, 0
22+
// Entelect colours - Hex - RGB - RBG_norm
23+
// Blue - #2196f3 - 33, 150, 243 - 0.13, 0.59, 0.95
24+
// Red - #f44336 - 244, 67, 54 - 0.96, 0.26, 0.21
25+
// Yellow - #fee50e - 254, 229, 14 - 1 , 0.9 , 0.05
26+
// Orange - #ff9800 - 255, 152, 0 - 1 , 0.6 , 0
2127

2228
}

Assets/EC2018/GameStateManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void ProcessIronCurtainHitList(List<Player> players) {
127127
for (int i = 0; i < players.Count; i++) {
128128
var available = players[i].IronCurtainAvailable;
129129
var lifetime = players[i].ActiveIronCurtainLifetime;
130-
if (available && lifetime <= 0 && lifetime > -6) {
130+
if (available && lifetime >= 0) {
131131
instantiator.ActivateIronCurtain(players[i].PlayerType);
132132
} else {
133133
instantiator.DeactivateIronCurtain(players[i].PlayerType);

Assets/EC2018/UIManager.cs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ void Update() {
5757
}
5858

5959
if(pulseIronCurtainPlayerA) {
60-
ironCurtainPlayerA.color = Color.Lerp (ColorUtil.playerA, ColorUtil.white, Mathf.PingPong (Time.time, 1f));
60+
ironCurtainPlayerA.color = Color.Lerp (ColorUtil.playerA, ColorUtil.lightGrey, Mathf.PingPong (Time.time, 1f));
6161
}
6262

6363
if(pulseIronCurtainPlayerB) {
64-
ironCurtainPlayerB.color = Color.Lerp (ColorUtil.playerB, ColorUtil.white, Mathf.PingPong (Time.time, 1f));
64+
ironCurtainPlayerB.color = Color.Lerp (ColorUtil.playerB, ColorUtil.lightGrey, Mathf.PingPong (Time.time, 1f));
6565
}
6666
}
6767

@@ -90,14 +90,24 @@ public void UpdateUI(GameDetails gameDetails, Player playerA, Player playerB) {
9090
ScoreB.text = GetScore (playerB);
9191

9292
if(playerA.IronCurtainAvailable) {
93-
pulseIronCurtainPlayerA = true;
93+
if (playerA.ActiveIronCurtainLifetime <= 0) {
94+
pulseIronCurtainPlayerA = true;
95+
} else {
96+
pulseIronCurtainPlayerA = false;
97+
ironCurtainPlayerA.color = ColorUtil.playerA;
98+
}
9499
} else {
95100
pulseIronCurtainPlayerA = false;
96101
ironCurtainPlayerA.color = ColorUtil.lightGrey;
97102
}
98103

99104
if(playerB.IronCurtainAvailable) {
100-
pulseIronCurtainPlayerB = true;
105+
if (playerB.ActiveIronCurtainLifetime <= 0) {
106+
pulseIronCurtainPlayerB = true;
107+
} else {
108+
pulseIronCurtainPlayerB = false;
109+
ironCurtainPlayerB.color = ColorUtil.playerB;
110+
}
101111
} else {
102112
pulseIronCurtainPlayerB = false;
103113
ironCurtainPlayerB.color = ColorUtil.lightGrey;

0 commit comments

Comments
 (0)