void Start() { cardCore = GetComponent <CardCore>(); image = GetComponent <Image>(); cardCore.CurrentCanUse .DistinctUntilChanged() .Subscribe(canUse => { if (canUse) { image.color = originalColor; } else { image.color = originalColor - disabledColor; } }) .AddTo(this); }
private void Start() { cardCore = GetComponent <CardCore>(); rectTransform = GetComponent <RectTransform>(); cardCore.CurrentInitialPosition .DistinctUntilChanged() .Subscribe(x => { startTime = Time.timeSinceLevelLoad; startPosition = rectTransform.localPosition; endPosition = x; shouldMove = true; if (!cardCore.isNextCard) { rectTransform.localScale = new Vector3(1.0f, 1.0f, 1.0f); } }) .AddTo(this); }
private void Start() { cardCore = GetComponent <CardCore>(); rectTransform = GetComponent <RectTransform>(); }