Hello guys i need a help about a scoreboard i am making here’s the scoreboard i want to achieve .
[116064-bac-display-bigroad-1034x176.png*|116064]
I actually have 4 tables and each tables has it’s own scoreboard but for this question only for table 1 is i need so here’s how I am creating this kind of scoreboard
Now what i have done so far is this
if (gametable_no == 1)
{
for (int i = 0; i < tzPlayInfo.Instance.bc_gametable_history_list.Count; i++)
{
newString[0] += tzPlayInfo.Instance.bc_gametable_history_list*.r;*
newString[0] += “,”;
}
string[] groupedString = newString[0].Split(‘,’);
foreach (string allchars in groupedString)
{
int x = 0;
int y = 0;
GameObject o = Instantiate(prefab_big_road[0]) as GameObject;
o.transform.SetParent(pos_big_road[0]);
o.transform.localScale = Vector3.one;
o.transform.localPosition = new Vector3(2.0f, -5.0f, 0f);
o.transform.localPosition = new Vector3(o.transform.localPosition.x + x,
o.transform.localPosition.y + y, o.transform.localPosition.z);
if (allchars.Contains(playerwinnopairboth))
{
o.GetComponent().spriteName = “layout_player_bigline-01”;
NGUITools.SetActive(o, true);
}
if (allchars.Contains(bankerwinnopairboth))
{
o.GetComponent().spriteName = “layout_banker_bigline-01”;
NGUITools.SetActive(o, true);
}
if (allchars.Contains(tienopairboth))
{
o.GetComponent().spriteName = “layout_tie_bigline-01”;
NGUITools.SetActive(o, true);
}
}
}
> This code will only achieve a bunch of data(s) in one place . What i mean by the is they’re all in the very first place of the scoreboard.
The output is generated randomly so for example i have this output data:
Gametable 1 history : P ,P ,P ,B ,B P,P P,TBP
What i am trying to do here is that I need to know if the character is changing in the gametable 1 history data
For example: The output must be like this
[116066-untitled3.png|116066]*
If the value is not changing like P ,P ,P
then the position will only increment on y axis then if the next value is different like B ,
then it will move to the x axis.
So my question is, Is there a way of detecting if the character on your array of string is different from the the other value?
*
*