/// <summary> /// 획득 UI 활성화 /// </summary> /// <param name="value"></param> public void ActivatedInfoUI(int value, Actor target, AcquireType acquireType) { // 획득 UI 노출 AcquireUI acquireUI = Generate(target.transform.position, acquireType); if (acquireUI != null) { acquireUI.SetInfo(value, target.transform); } }
/// <summary> /// 획득 UI 초기화 /// </summary> /// <param name="position">표시될 지점</param> /// <param name="acquireType">표시될 획득 정보 타입</param> /// <returns></returns> public AcquireUI Generate(Vector3 position, AcquireType acquireType) { // 인덱스를 범어났을 시 초기화 if (acquireUiOrderIndex >= acquireUIs.Length) { acquireUiOrderIndex = 0; } AcquireUI acquireUI = acquireUIs[acquireUiOrderIndex]; // 위치, 인덱스, 스프라이트 셋팅 acquireUI.transform.position = position; acquireUI.UiIndex = acquireUiOrderIndex; acquireUI.Icon = GameManager.Instance.SpriteSetManager.GetSprite(acquireType.ToString()); // 획득 UI 화면에 표시 acquireUI.gameObject.SetActive(true); // 인덱스 증가 acquireUiOrderIndex++; return(acquireUI); }