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); }
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); } }