라이브러리 오류 수정
This commit is contained in:
@@ -30,12 +30,10 @@ namespace CHN
|
||||
|
||||
public Action<string> onClickLabelButton;
|
||||
public Action<Machine> onClickLibraryButton;
|
||||
public Action<string> onClickLibraryOpenButton;
|
||||
public Action<string> onClickLibraryCloseButton;
|
||||
|
||||
|
||||
public Vector3 originPos;
|
||||
public Vector3 downPos;
|
||||
public Vector2 originPos;
|
||||
public Vector2 downPos;
|
||||
|
||||
public float fadeTime;
|
||||
public bool isActive;
|
||||
@@ -48,8 +46,9 @@ namespace CHN
|
||||
prf_FilterToggle = Resources.Load<UI_FilterButton>("Prefabs/UI/PRF_UI_FilterButton");
|
||||
Button_Active.onClick.AddListener(OnClickActiveButton);
|
||||
|
||||
originPos = rectTransform.position;
|
||||
downPos = new Vector3(originPos.x, originPos.y - rectTransform.rect.height, originPos.z);
|
||||
originPos = rectTransform.anchoredPosition;
|
||||
downPos = originPos - new Vector2(0f, rectTransform.rect.height);
|
||||
|
||||
isActive = true;
|
||||
}
|
||||
|
||||
@@ -94,11 +93,11 @@ namespace CHN
|
||||
{
|
||||
if (!isActive)
|
||||
{
|
||||
onClickLibraryOpenButton?.Invoke("¶óÀ̺귯¸®");
|
||||
Open();
|
||||
}
|
||||
else
|
||||
{
|
||||
onClickLibraryCloseButton?.Invoke("¶óÀ̺귯¸®");
|
||||
Close();
|
||||
}
|
||||
}
|
||||
public void Open()
|
||||
@@ -152,7 +151,7 @@ namespace CHN
|
||||
onClickLibraryButton?.Invoke(machineButton.machine);
|
||||
}
|
||||
|
||||
IEnumerator MoveAnimation(Vector3 targetPos)
|
||||
IEnumerator MoveAnimation(Vector2 targetPos)
|
||||
{
|
||||
float timer = 0f;
|
||||
float percent = 0f;
|
||||
@@ -161,7 +160,7 @@ namespace CHN
|
||||
{
|
||||
timer += Time.deltaTime;
|
||||
percent = timer / fadeTime;
|
||||
rectTransform.position = Vector3.Lerp(rectTransform.position, targetPos, percent);
|
||||
rectTransform.anchoredPosition = Vector2.Lerp(rectTransform.anchoredPosition, targetPos, percent);
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user