Exemple #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;
        }
    }
Exemple #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();
     }
 }
Exemple #4
0
 public void ResetTimer()
 {
     FishTimer.Stop();
 }
Exemple #5
0
 public void Grab(Hand hand)
 {
     Destroy(GetComponent <FixedJoint>());
     fishEscapingTimer.Stop();
 }
 void EraseIndicator()
 {
     clignotement.Stop();
     GetComponentInChildren <MeshRenderer>().enabled = false;
     hookIndicator.SetActive(false);
 }
 void OnOutWater()
 {
     inWater = false;
     rideTimer.Stop();
 }