Commit ccb53ca7 authored by mercury233's avatar mercury233

fix displaying infinite time limit

parent 606d0d99
...@@ -152,7 +152,7 @@ public class gameInfo : MonoBehaviour ...@@ -152,7 +152,7 @@ public class gameInfo : MonoBehaviour
HashedButtons.RemoveAt(i); HashedButtons.RemoveAt(i);
} }
float height = 132 + 50 * j; float height = 132 + 50 * j;
if (j == 0) if (j == 0)
{ {
height = 116; height = 116;
} }
...@@ -270,7 +270,7 @@ public class gameInfo : MonoBehaviour ...@@ -270,7 +270,7 @@ public class gameInfo : MonoBehaviour
void refreshLine() void refreshLine()
{ {
int j = 0; int j = 0;
for (int i = 0; i < HashedButtons.Count; i++) for (int i = 0; i < HashedButtons.Count; i++)
{ {
if (!HashedButtons[i].dying) if (!HashedButtons[i].dying)
...@@ -330,8 +330,16 @@ public class gameInfo : MonoBehaviour ...@@ -330,8 +330,16 @@ public class gameInfo : MonoBehaviour
opponent.under.mainTexture = GameTextureManager.exBar; opponent.under.mainTexture = GameTextureManager.exBar;
me.under.mainTexture = GameTextureManager.bar; me.under.mainTexture = GameTextureManager.bar;
} }
me.api_timeHint.text = "paused"; if (Program.I().ocgcore.timeLimit == 0)
opponent.api_timeHint.text = "paused"; {
me.api_timeHint.text = "infinite";
opponent.api_timeHint.text = "infinite";
}
else
{
me.api_timeHint.text = "paused";
opponent.api_timeHint.text = "paused";
}
} }
public bool amIdanger() public bool amIdanger()
...@@ -341,6 +349,10 @@ public class gameInfo : MonoBehaviour ...@@ -341,6 +349,10 @@ public class gameInfo : MonoBehaviour
void setTimeAbsolutely(int player, int t) void setTimeAbsolutely(int player, int t)
{ {
if (Program.I().ocgcore.timeLimit == 0)
{
return;
}
if (player == 0) if (player == 0)
{ {
me.api_timeHint.text = t.ToString() + "/" + Program.I().ocgcore.timeLimit.ToString(); me.api_timeHint.text = t.ToString() + "/" + Program.I().ocgcore.timeLimit.ToString();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment