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; } }
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(); } }
public void ResetTimer() { FishTimer.Stop(); }
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(); }