private void updateView() { this.gameObject.SetActive(true); this.fillImg.sprite = this.bgImg.sprite = ResFactory.getSprite(this.cardData.id); this.slider.value = 1; this.gameObject.name = this._cardData.id; float scale1 = 0.1f; float scale2 = 0.67f; LeanTween.cancel(this.gameObject, false); this.gameObject.transform.localRotation = new Quaternion(); this.gameObject.transform.localScale = new Vector3(scale1, scale1, scale1); LeanTween.scale(this.gameObject, new Vector3(scale2, scale2, scale2), 0.3f).tweenType = LeanTweenType.easeOutBack; //DOTween.To (() => this.transform.localScale, x => this.transform.localScale = x, new Vector3(scale,scale,scale), 0.3f); }
void updateView() { this.image.sprite = ResFactory.getSprite(this.id); }