Exemplo n.º 1
0
 public void setUpgrade(AltarUpgrade _upgrade)
 {
     upgrade            = _upgrade;
     spriteRend.sprite  = upgrade.Icon;
     altarLight.color   = upgrade.lightColor;
     spriteRend.color   = Color.white;
     spriteRend.enabled = true;
     altarLight.enabled = true;
     spriteRend.gameObject.SetActive(true);
 }
Exemplo n.º 2
0
    public void showErrorMessage(AltarUpgrade upgrade, float duration)
    {
        uiboxText.text = "NOT ENOUGH BONES";
        costsText.text = "";

        Image d = dialogBackground.GetComponent <Image>();

        d.color = Color.red;

        LeanTween.moveLocalX(dialogBox, 100f, duration).setEaseOutBounce().setOnComplete(() =>
        {
            LeanTween.moveLocalX(dialogBox, 0, duration).setEaseOutBounce().setOnComplete(() =>
            {
                d.color        = Color.white;
                uiboxText.text = upgrade.uiText;
                costsText.text = "Cost: " + upgrade.BoneCost.ToString();
            });
        });
    }