private void OnMouseDown() { if (isDead) { return; } ComboHandler.ResetValues(); if (cooldown == false && isDead == false) { audio.Stop(); isHeldDown = true; tutorialText.text = "Now let go!"; rigidBody.isKinematic = true; rigidBody.constraints = RigidbodyConstraints2D.FreezePositionX; rigidBody.constraints = RigidbodyConstraints2D.FreezePositionY; timeManager.StartSlowMotion(0.5f); trail.emitting = false; lineRenderer.enabled = true; anchorRb.position = rigidBody.position; GetComponent <SpringJoint2D>().enabled = true; Invoke("ResetCooldown", 0.5f); cooldown = true; } }
private void ResetScores() { SpawnObjects.hasFirstBombGoneOff = false; ScoreDisplay.score = 0; ScoreDisplay.moneyBagsDrops = 0; bossScoreMoney = 0; bossesKilled = 0; if (GreenOrbShield.hasGreenShieldBeenBought == true) { GreenOrbShield.isGreenShieldActive = true; } if (PlayerPrefs.GetInt("AbilityTile3") == 1) { ScoreDisplay.scoreMultiplier = 3; ScoreDisplay.scoreMultiplierIncreaser = 1; } else { ScoreDisplay.scoreMultiplier = 1; ScoreDisplay.scoreMultiplierIncreaser = 1; } ScoreDisplay.multiplierGoal = 50; Destroy(GameObject.FindGameObjectWithTag("Projectile")); ComboHandler.ResetValues(); }
private void Restart() { timeManager.StopSlowMotion(); SceneManager.LoadScene(SceneManager.GetActiveScene().name); ScoreDisplay.score = 0; ScoreDisplay.scoreMultiplier = 1; ScoreDisplay.multiplierGoal = 50; DestroyAllProjectiles(); ComboHandler.ResetValues(); }