示例#1
0
    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);
 }
示例#3
0
 private void ConvertGold(ulong amount)
 {
     print(GameExtension.ConvertGold(amount));
 }
示例#4
0
 private void SetGold(ulong value)
 {
     goldTxt.text = GameExtension.ConvertGold(value);
 }
示例#5
0
 public void UpdateUpgradeCircleCost()
 {
     upgradeCircleBtn.GetComponentInChildren <Text>().text = GameExtension.ConvertGold(_parent.GetUpgradeCircleCost);
 }
示例#6
0
 private void UpdateCircleCost()
 {
     addNewCircleBtn.GetComponentInChildren <Text>().text = GameExtension.ConvertGold(_parent.GetNextCircleCost);
 }
示例#7
0
 private void UpdateUpgradeCost()
 {
     upgradeLevelBtn.GetComponentInChildren <Text>().text = GameExtension.ConvertGold(_parent.GetUpgradeCost());
 }