Пример #1
0
    void Update()
    {
        infoText.text = "Fps: " + fps + " Errors:" + _Console.exceptionCount + " Ping: " + (int)pingAverage;
        if (_TimerA.TimeElapsed(500))
        {
            fps = (int)_TimerA.GetFps();
        }

        if (Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.M))
        {
            _Console.enabled = !_Console.enabled;
        }

        _Music.audio.volume  = _SettingsWindow.MusicVolume;
        AudioListener.volume = disableSounds ? 0 : _SettingsWindow.SoundVolume;
        //if (Network.sendRate != _SettingsWindow.NetworkSendRate) Network.sendRate = _SettingsWindow.NetworkSendRate;
        if (!isWebPlayer && Input.GetKey(KeyCode.LeftControl) && Input.GetKeyDown(KeyCode.C))
        {
            var path = curdir + "/ScreenShots/Screenshot" + DateTime.Now.ToFileTime() + ".png";
            Debug.Log("sceenshot saved " + path);
            Application.CaptureScreenshot(path);
        }
        _TimerA.Update();
        //WWW2.Update();
    }
Пример #2
0
 void Update()
 {
     if (timer.TimeElapsed(1000))
     {
         fps = (int)timer.GetFps();
     }
     UpdateOther();
     timer.Update();
 }
Пример #3
0
 void Update()
 {
     //networkTime += Time.deltaTime;
     if (timer.TimeElapsed(1000))
     {
         fps = (int)timer.GetFps();
     }
     UpdateOther();
     timer.Update();
 }