Esempio n. 1
0
 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);
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 private void Start()
 {
     cardCore      = GetComponent <CardCore>();
     rectTransform = GetComponent <RectTransform>();
 }