Esempio n. 1
0
    void countdownUntilServe(object arg)
    {
        float time = (float)arg;

        float secondsUntilHit = (hframe - sframe) / fps;
        float secondsAfterHit = (eframe - hframe) / fps;

        Debug.Log("remaining until serve: " + time + " phase1: " + secondsUntilHit + " phase2: " + secondsAfterHit);
        StartCoroutine(AutoClick.InvokeRealtimeCoroutine(PlayVideo, time - secondsUntilHit - constantT));
        StartCoroutine(AutoClick.InvokeRealtimeCoroutine(StopVideo, time + secondsAfterHit - constantT));
    }
Esempio n. 2
0
    private void startServe()
    {
        int serve = serves[0];

        serves.RemoveAt(0);
        Logger.Instance.write("Request Serve Type " + serve);
        EventManager.TriggerEvent("RequestVideoServe", serve);
        if (serves.Count > 0)
        {
            StartCoroutine(AutoClick.InvokeRealtimeCoroutine(startServe, INTERVAL));
            //Invoke("startServe", 3.0f);
        }
    }
Esempio n. 3
0
 void bulletTimeStart()
 {
     bulletTimeRacket.enabled = true;
     normalRacket.enabled     = false;
     //ballCamera.enabled = true;
     ballCameraPlane.SetActive(true);
     mRenderer.material.SetTexture("_MainTex", bulletTimeTexture);
     initTS = Time.timeScale;
     //Time.timeScale = 0.1f;
     Time.timeScale = 0.01f;
     if (serveType == 2)
     {
         Time.timeScale = 0.10f;
     }
     //Invoke("reset", 1f * Time.timeScale);
     StartCoroutine(AutoClick.InvokeRealtimeCoroutine(reset, 1f));
 }