Beispiel #1
0
 private void OnCatchFish()
 {
     bobber.GetComponent <Bobber>().attachFishToBobber(bobber.GetComponent <Bobber>().actualAppat.typesPoisson[indexOfFishHooked]);
     Destroy(fishInWater);
     onCatch = false;
     hapticDistance.enabled       = false;
     currentStep                  = 0;
     poseFishing.actualDifficulty = 0;
     fishEscapingTimer.Stop();
 }
    // Update is called once per frame
    void Update()
    {
        if (!GameManager.Instance.GetInGame())
        {
            return;
        }

        /*if (Input.GetKeyDown(KeyCode.A))
         * {
         *  DestroyAllObjects();
         * }*/

        if (!IsThrowing && GameManager.Instance.getDbMicro() > settings.minDbForThrowThings)
        {
            ThrowObject();
            IsThrowing = true;
        }

        if (GameManager.Instance.getDbMicro() < settings.minDbForThrowThings)
        {
            ThrowTimer.Stop();
            IsThrowing = false;
        }
    }
Beispiel #3
0
 public static void Invoke(Action a, TimeMode mode, float time)
 {
     if (time == 0f)
     {
         a();
     }
     else
     {
         var timer = new UTimer(mode);
         timer.Duration      = time;
         timer.TimerElapsed += () =>
         {
             timer.Stop();
             if (a != null)
             {
                 a();
             }
             timer = null;
         };
         timer.Start();
     }
 }
Beispiel #4
0
 public void ResetTimer()
 {
     FishTimer.Stop();
 }
Beispiel #5
0
 public void Grab(Hand hand)
 {
     Destroy(GetComponent <FixedJoint>());
     fishEscapingTimer.Stop();
 }
 void EraseIndicator()
 {
     clignotement.Stop();
     GetComponentInChildren <MeshRenderer>().enabled = false;
     hookIndicator.SetActive(false);
 }
Beispiel #7
0
 void OnOutWater()
 {
     inWater = false;
     rideTimer.Stop();
 }