Esempio n. 1
0
 public bool Right()
 {
     if (current)
     {
         SlotComponent mRight = current.MostRight(this);
         if (Move(mRight, mRight.x - current.x))
         {
             animator.SetTrigger("trigger_right");
         }
         else
         {
             return(false);
         }
     }
     else
     {
         Debug.LogError("slot reference missing (id:" + id + ")");
     }
     return(true);
 }
Esempio n. 2
0
 public SlotComponent MostRight(BoxComponent box)
 {
     if (RIGHT != null)
     {
         if (RIGHT.IsEmpty)
         {
             return(RIGHT.MostRight(box));
         }
         else if (RIGHT.IsMergable(box))
         {
             return(RIGHT);
         }
         else
         {
             return(this);
         }
     }
     else
     {
         return(this);
     }
 }