파일 정리 및 모델링 수정
This commit is contained in:
@@ -43,7 +43,6 @@ namespace CHN
|
||||
{
|
||||
//RaycastOnClickThermostat();
|
||||
RaycastOnClickMachine();
|
||||
RaycastOnClickProductionStatusBoard();
|
||||
}
|
||||
|
||||
private void RaycastOnClickMachine()
|
||||
@@ -117,36 +116,5 @@ namespace CHN
|
||||
onClickThermostat?.Invoke();
|
||||
}
|
||||
}
|
||||
private void RaycastOnClickProductionStatusBoard()
|
||||
{
|
||||
bool leftClick = Input.GetMouseButtonDown(0);
|
||||
|
||||
if (!leftClick)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (controller.IsClickUI)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var layerMask = LayerMask.GetMask("ProductionStatusBoard");
|
||||
var ray = controller.camera.ScreenPointToRay(Input.mousePosition);
|
||||
hitInfo = Physics.RaycastAll(ray, Mathf.Infinity, layerMask);
|
||||
|
||||
if (hitInfo.Length == 0)
|
||||
return;
|
||||
|
||||
Array.Sort(hitInfo, (hit1, hit2) => hit1.distance.CompareTo(hit2.distance));
|
||||
var hitColider = hitInfo[0].collider;
|
||||
|
||||
var board = hitColider.GetComponent<ProductionStatusBoard>();
|
||||
|
||||
if (leftClick)
|
||||
{
|
||||
onClickProductionBoard?.Invoke(board.boardType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user