예제 #1
0
 public void FillStepBuffer(SliderData data)
 {
     if (data != null)
     {
         this.CreateStep(data);
         FillStepBuffer(data.data);
     }
 }
예제 #2
0
        private void CreateStep(SliderData data)
        {
            if (this.StepBuffer.Count - 1 < data.index)
            {
                this.StepBuffer.Add(new List <SliderData>());
            }

            if (data.hook)
            {
                this.StepBuffer[data.index].Add(data);
            }
        }
예제 #3
0
        private void Down(SliderData data)
        {
            if (data.amount > data.totalAmount)
            {
                if (this.IsDefultSpeed)
                {
                    data.amount -= (Time.deltaTime * this.CalcSpeed(data.index));
                }
                else
                {
                    data.amount -= (Time.deltaTime * this.Speed);
                }
                data.slider.fillAmount = data.amount;

                if (data.amount <= 0)
                {
                    data.slider.fillAmount = 0;
                }

                if (data.amount <= data.totalAmount)
                {
                    counter++;
                    Debug.Log("Counter: " + counter);
                }

                if (data.amount <= 0)
                {
                    if (data.lblLv != null)
                    {
                        data.lblLv.text = data.nextLv + "";
                    }
                    if (data.imgLv != null)
                    {
                        data.imgLv.spriteName = data.nextLv + "";
                    }
                }
            }
        }
예제 #4
0
        public void Up(SliderData data)
        {
            if (data.amount < data.totalAmount && data.amount != -1)
            {
                if (this.IsDefultSpeed)
                {
                    data.amount += (Time.deltaTime * this.CalcSpeed(data.index));
                }
                else
                {
                    data.amount += (Time.deltaTime * this.Speed);
                }
                data.slider.fillAmount = data.amount;

                if (data.amount >= this.MaxAmount)
                {
                    data.slider.fillAmount = this.MaxAmount;
                }

                if (data.amount >= data.totalAmount)
                {
                    counter++;
                    Debug.Log("Counter: " + counter);
                }

                if (data.amount >= this.MaxAmount)
                {
                    if (data.lblLv != null)
                    {
                        data.lblLv.text = data.nextLv + "";
                    }
                    if (data.imgLv != null)
                    {
                        data.imgLv.spriteName = data.nextLv + "";
                    }
                }
            }
        }