My game has 3 clock's and all of them are controlled by the Flash client.
I want to make the control by the server, and I'm trying to use the AddTimer event.
I read the instructions but I didn'd understand...
So, what I'm doing:
At first, this is a message sent from the game:
- Code: Select all
case "startJogo":
{
int nada = message.GetInt(0);
tempoTotal();
break;
}
After I receive this message, I call the tempoTotal() function:
- Code: Select all
private void tempoTotal()
{
AddTimer(delegate{mandaTempo();},166);
}
And at last, I send a Broadcast:
- Code: Select all
private void mandaTempo()
{
Broadcast("tempoTotal", 1);
}
But nothing happens.
PS: will this ensure that all the clients will have the same clock time?