public void Play(ulong amount, Vector3 position, bool isCircle) { var finalDuration = isCircle ? duration * 1.5f : duration; var durationSection = finalDuration / 4; transform.localScale = startScale; rectTransform.anchoredPosition = position; canvasGroup.alpha = 0f; goldTxt.text = GameExtension.ConvertGold(amount); var targetScale = startScale + scaleRange; transform.DOScale(targetScale, finalDuration).SetEase(ease).OnComplete(Remove); transform.DOShakeScale(finalDuration, shakeStrength); canvasGroup.DOFade(1, durationSection); canvasGroup.DOFade(0, durationSection).SetDelay(durationSection * 3); if (targetPos != Vector3.zero) { rectTransform.DOAnchorPos(targetPos, finalDuration).SetEase(ease); } else { var targetYPos = transform.position.y + upAmount; rectTransform.DOAnchorPosY(targetYPos, finalDuration).SetEase(ease); } }
public void UpdateGold(uint amount) { goldTxt.text = GameExtension.ConvertGold(amount); }
private void ConvertGold(ulong amount) { print(GameExtension.ConvertGold(amount)); }
private void SetGold(ulong value) { goldTxt.text = GameExtension.ConvertGold(value); }
public void UpdateUpgradeCircleCost() { upgradeCircleBtn.GetComponentInChildren <Text>().text = GameExtension.ConvertGold(_parent.GetUpgradeCircleCost); }
private void UpdateCircleCost() { addNewCircleBtn.GetComponentInChildren <Text>().text = GameExtension.ConvertGold(_parent.GetNextCircleCost); }
private void UpdateUpgradeCost() { upgradeLevelBtn.GetComponentInChildren <Text>().text = GameExtension.ConvertGold(_parent.GetUpgradeCost()); }