public bool Left() { if (current) { SlotComponent mLeft = current.MostLeft(this); if (Move(mLeft, mLeft.x - current.x)) { animator.SetTrigger("trigger_left"); } else { return(false); } } else { Debug.LogError("slot reference missing (id:" + id + ")"); } return(true); }
public SlotComponent MostLeft(BoxComponent box) { if (LEFT != null) { if (LEFT.IsEmpty) { return(LEFT.MostLeft(box)); } else if (LEFT.IsMergable(box)) { return(LEFT); } else { return(this); } } else { return(this); } }