예제 #1
0
 public void Determine()
 {
     if (handler.IsSelectable(currentIdx))
     {
         Debug.Log("currentIdx:" + currentIdx);
         handler.OnSelect(currentIdx, container.transform.GetChild(currentIdx));
     }
 }
 public void Init(RouletteSelectorHandler handler)
 {
     this.handler         = handler;
     this.eachRadian      = this.PIx2 / (float)this.itemCount;
     this.goalRadiusScale = 1f;
     this.CancelMoving();
     this.CancelRadiusScaling();
     this.controllable = true;
     for (int i = 0; i < this.itemCount; i++)
     {
         if (handler.IsSelectable(i))
         {
             this.SetCurrent(i);
             break;
         }
     }
     this.Reposition();
 }
예제 #3
0
 public void Init(RouletteSelectorHandler handler)
 {
     this.handler    = handler;
     eachRadian      = PIx2 / (float)itemCount;
     goalRadiusScale = 1f;
     CancelMoving();
     CancelRadiusScaling();
     controllable = true;
     for (int i = 0; i < itemCount; i++)
     {
         if (handler.IsSelectable(i))
         {
             SetCurrent(i);
             break;
         }
     }
     Reposition();
 }