public void setPos(PlaceHolderPos _pos) { twSeq.Kill(); if (_pos == PlaceHolderPos.close) { transform.position = closePos; } else if (_pos == PlaceHolderPos.outter) { transform.position = outterPos; } else if (_pos == PlaceHolderPos.far) { transform.position = farPos; } }
public void moveToward(PlaceHolderPos _pos) { var target = closePos; if (_pos == PlaceHolderPos.close) { target = closePos; } else if (_pos == PlaceHolderPos.outter) { target = outterPos; } else if (_pos == PlaceHolderPos.far) { target = farPos; } transform.DOMove(target, 2f); Invoke("startPlaceHolderAnimation", 2f); }