public void CalculateScore(JewellerPiece.piece anchorType, JewellerPiece.piece jewelleryType) { if (anchorType == jewelleryType) { //Debug.Log("scored it"); var curScore = scoreValue.GetValue(); var total = totalScore.GetValue(); totalScore.SetValue(curScore + total); //scoreText.text = totalScore.GetValue().ToString(); //add feadback for player here if (!_isDisabled) { feedbacks.GiveFeedback(); } } noOfJewelleryPieces--; if (noOfJewelleryPieces <= 0) { _isComplete = true; } else { _isComplete = false; } }
public void AddScore() { float score = 100 * scoreMultiplier.GetValue(); totalScore.ApplyChange(score); currentScore.ApplyChange(score); }
public void CalculateScore(JewellerPiece.piece anchorType, JewellerPiece.piece jewelleryType) { //if(anchorProperty.GetAnchorType() == anchorProperty.GetCurrentSelectedPiece()) if (anchorType == jewelleryType) { //Debug.Log("scored it"); var curScore = scoreValue.GetValue(); var total = totalScore.GetValue(); totalScore.SetValue(curScore + total); //scoreText.text = totalScore.GetValue().ToString(); //add feadback for player here if (!_isDisabled) { feedbacks.GiveFeedback(); } } noOfJewelleryPieces--; if (noOfJewelleryPieces <= 0) { //Debug.Log("jewellery complete"); undoButton.SetActive(false); _isComplete = true; } else { //Debug.Log("jewellery incomplete"); _isComplete = false; } }
public void UpdateUI() { float sizeMultiplier = 0.0f; this.scoreText.text = currentScore.GetValue().ToString(); sizeMultiplier = currentScore.GetValue() / 5000; if (sizeMultiplier > 1.0f) { sizeMultiplier = 1.0f; } anim.SetFloat("SizeMultiplier", sizeMultiplier); anim.Play("Change Blend Tree"); anim.SetBool("HasChanged", true); }
private IEnumerator TriggerAttackAnimation() { animator.SetFloat("attackDirection", playerDirection.GetValue()); animator.SetBool("isAttacking", true); yield return(null); animator.SetBool("isAttacking", false); }
private void Update() { // Checking if the simulation speed has not been updated if (_simSpeed != _simulationSpeed.GetValue()) { _simulationSpeed.SetValue(_simSpeed); } }
public void CalculateReward(FloatVariable score) { var totalRewardValue = _levelManager.GetCurrentLevel().totalReward; var accurecyPoints = score.GetValue(); var calculatedReward = Mathf.RoundToInt(totalRewardValue * accurecyPoints / 100); _totalCash += calculatedReward; rewardText.text = "+" + calculatedReward.ToString(); }
private void Update() { if (Image == null || Variable == null || Min == null || Max == null) { return; } Image.fillAmount = Mathf.Clamp01( Mathf.InverseLerp(Min.GetValue(), Max.GetValue(), Variable.GetValue())); }
private void Update() { var accuracy = score.GetValue(); meter.fillAmount = accuracy / 100f; if (accuracyText) { accuracyText.text = accuracy.ToString("00") + "%"; } //Debug.Log(meter.fillAmount); }
public void CheckRecord() { int newScore = Mathf.RoundToInt(score.GetValue()); //Iterate through all current scores for (int i = 0; i < scores.Count; i++) { if (newScore > scores[i]) { SaveScores(i, newScore); break; } } }
public void AddScore() { int width = group.width; int height = group.height; float scorePerBlock = 0; float score; if (width <= height) { scorePerBlock = WidthMultiplier(); } else if (width > height) { scorePerBlock = HeightMultiplier(); } score = (scorePerBlock * width * height) * scoreMultiplier.GetValue(); this.totalScore.ApplyChange(score); this.currentScore.ApplyChange(score); }
private bool hasChangedDirection() { return(lastPlayerDirection != playerDirection.GetValue()); }
public void UpdateUI() { scoreText.text = score.GetValue().ToString(); }
private void Start() { this.scoreText.text = score.GetValue().ToString(); }