private void EvaluateActivateCollider(float position, InfiniteWheelItem item, int index)
        {
            if (Math.Abs(Mathf.Clamp01(Mathf.RoundToInt(premadeWheelConfig.colliderActivate.Evaluate(position))) - 1) < 0.01f)
            {
                if (isClickable || !wheelMouseScroll.IsScrolling())
                {
                    if (Application.isPlaying)
                    {
                        if (saveState)
                        {
                            PlayerPrefs.SetInt(ID_WHEEL, index);
                        }
                    }

                    item.ActivateCollider(true);
                    Index = index;
                }
                else
                {
                    item.ActivateCollider(false);
                }
            }
            else
            {
                item.ActivateCollider(false);
            }
        }
예제 #2
0
 public void EvaluateScale(float position, InfiniteWheelItem item)
 {
     if (enableItemScale)
     {
         item.SetLocalScale(new Vector3(
                                itemScale.Evaluate(position),
                                itemScale.Evaluate(position),
                                itemScale.Evaluate(position)
                                ));
     }
     else
     {
         item.SetLocalScale(Vector3.one);
     }
 }
예제 #3
0
 public void EvaluateActivateIten(float position, InfiniteWheelItem iten)
 {
     iten.ActivateItem(!(enableItemActivate && !((int)itemActivate.Evaluate(position) == 1)));
 }