コード例 #1
0
 public bool Down()
 {
     if (current)
     {
         SlotComponent mDown = current.MostDown(this);
         if (Move(mDown, mDown.y - current.y))
         {
             animator.SetTrigger("trigger_down");
         }
         else
         {
             return(false);
         }
     }
     else
     {
         Debug.LogError("slot reference missing (id:" + id + ")");
     }
     return(true);
 }
コード例 #2
0
 public SlotComponent MostDown(BoxComponent box)
 {
     if (DOWN != null)
     {
         if (DOWN.IsEmpty)
         {
             return(DOWN.MostDown(box));
         }
         else if (DOWN.IsMergable(box))
         {
             return(DOWN);
         }
         else
         {
             return(this);
         }
     }
     else
     {
         return(this);
     }
 }