Exemplo n.º 1
0
    // This function is called every fixed framerate frame, if the MonoBehaviour is enabled
    private void FixedUpdate()
    {
        if (sendRunningGameJob != null)
        {
            if (sendRunningGameJob.Update())
            {
                sendRunningGameJob = null;
            }
        }

        if (dashboardInfo != null)
        {
            if (dashboardInfo.CurrentRunningMode.RunningMode == Enums.ClientRunningMode.TIMING_ON)
            {
                TimeSpan tsTimeLeft = dashboardInfo.CurrentRunningMode.StartTime.AddMinutes((double)dashboardInfo.CurrentRunningMode.Duration).Subtract(DateTime.Now);

                tsTimeLeft = (tsTimeLeft > TimeSpan.Zero) ? tsTimeLeft : new TimeSpan(0, 0, 0);

                TimeLeftComponent.text = "PLAY TIME" + Environment.NewLine + "LEFT: " + tsTimeLeft.TotalMinutes.ToString("00");

                TimeLeftTimingComponent.text = "PLAY TIME LEFT: " + tsTimeLeft.Minutes + ":" + tsTimeLeft.Seconds;
            }
        }
        else
        {
            TimeLeftComponent.text = "";
        }
    }
Exemplo n.º 2
0
    public void SendRunningGames(bool isPostTermCheck = false)
    {
        sendRunningGameJob = new SendRunningGameJob();
        sendRunningGameJob.connectionInfo = targetServerConnectionInfo;
        sendRunningGameJob.Start();

        //Debug.Log("SendRunningGames(" + isPostTermCheck.ToString() + ")");
    }