Пример #1
0
    public override void update(MenuBase m)
    {
        data.menu = m;
        foreach (Button b in buttons)
        {
            b.calculate(data);
        }

        if (Network.isServer)
        {
            host.calculate(data);
        }
        else
        {
            ready.calculate(data);
        }

        if (!Connections.GetInstance().isConnected)
        {
            m.goBack();
        }

        if (!Connections.GetInstance().localPlayers.Exists(x => x.ready))
        {
            ready.setText("Ready");
        }

        else
        {
            ready.setText("Not ready");
        }

        if (Connections.GetInstance().playersReady)
        {
            host.setText("Start");
        }

        else
        {
            host.setText("Waiting");
        }
    }