생산 진행, 조립 진행 현황판 기능 수정
This commit is contained in:
@@ -7,21 +7,11 @@ public class UI_StatusContent : MonoBehaviour
|
||||
{
|
||||
public Dictionary<string, UI_MachineStatus> machineStatuses = new Dictionary<string, UI_MachineStatus>();
|
||||
private UI_MachineStatus prf_machineStatus;
|
||||
public Vector3 resetPosition;
|
||||
|
||||
private float moveSpeed;
|
||||
private Vector3 centerPosition;
|
||||
private Vector3 endContentPosition;
|
||||
public override void AfterAwake()
|
||||
{
|
||||
prf_machineStatus = Resources.Load<UI_MachineStatus>("Prefabs/UI/UI_StatusItem");
|
||||
}
|
||||
public void SetEndPosition(Vector3 centerPos, Vector3 endPos, float speed)
|
||||
{
|
||||
centerPosition = centerPos;
|
||||
endContentPosition = endPos;
|
||||
moveSpeed = speed;
|
||||
}
|
||||
public void SetProductionStatusItem(List<CompleteInfo> machineInfos)
|
||||
{
|
||||
bool odd = true;
|
||||
@@ -44,28 +34,4 @@ public class UI_StatusContent : MonoBehaviour
|
||||
odd = !odd;
|
||||
}
|
||||
}
|
||||
public void StartMoveAnimation()
|
||||
{
|
||||
StopAllCoroutines();
|
||||
StartCoroutine(MoveAnimation());
|
||||
}
|
||||
private IEnumerator MoveAnimation()
|
||||
{
|
||||
while (transform.localPosition.x >= resetPosition.x)
|
||||
{
|
||||
transform.localPosition += Vector3.left * moveSpeed;
|
||||
|
||||
if (transform.localPosition.x == centerPosition.x)
|
||||
{
|
||||
yield return new WaitForSeconds(2f);
|
||||
}
|
||||
|
||||
if (transform.localPosition.x == resetPosition.x)
|
||||
{
|
||||
yield return new WaitForSeconds(2f);
|
||||
transform.localPosition = endContentPosition;
|
||||
}
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user