public bool Up() { if (current) { SlotComponent mUp = current.MostUp(this); if (Move(mUp, mUp.y - current.y)) { animator.SetTrigger("trigger_up"); } else { return(false); } } else { Debug.LogError("slot reference missing (id:" + id + ")"); } return(true); }
public SlotComponent MostUp(BoxComponent box) { if (UP != null) { if (UP.IsEmpty) { return(UP.MostUp(box)); } else if (UP.IsMergable(box)) { return(UP); } else { return(this); } } else { return(this); } }