불필요한 코드 제거
This commit is contained in:
@@ -31,41 +31,39 @@ namespace CHN
|
|||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
RaycastChangeView();
|
//RaycastChangeView();
|
||||||
RaycastOnClickMachine();
|
RaycastOnClickMachine();
|
||||||
RaycastOnClickProductionStatusBoard();
|
RaycastOnClickProductionStatusBoard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void RaycastChangeView()
|
//private void RaycastChangeView()
|
||||||
{
|
//{
|
||||||
if (controller.viewMode != ViewMode.PerspectiveView)
|
// if (controller.viewMode != ViewMode.PerspectiveView)
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
bool isChangeView = false;
|
// bool isChangeView = false;
|
||||||
|
|
||||||
Transform camera = controller.camera.transform;
|
// Transform camera = controller.camera.transform;
|
||||||
|
|
||||||
LayerMask layerMask = LayerMask.GetMask("Floor Ground", "Floor Wall");
|
// LayerMask layerMask = LayerMask.GetMask("Floor Ground", "Floor Wall");
|
||||||
|
|
||||||
if (Physics.Raycast(camera.position, camera.forward, out hit, Mathf.Infinity, layerMask))
|
// if (Physics.Raycast(camera.position, camera.forward, out hit, Mathf.Infinity, layerMask))
|
||||||
{
|
// {
|
||||||
var hitLayer = hit.collider.gameObject.layer;
|
// var hitLayer = hit.collider.gameObject.layer;
|
||||||
|
// hitFloorIndex = hit.collider.gameObject.GetComponentInParent<Floor>().floorIndex;
|
||||||
|
|
||||||
Debug.Log(hitLayer);
|
// LayerMask wallMask = LayerMask.GetMask("Floor Wall");
|
||||||
hitFloorIndex = hit.collider.gameObject.GetComponentInParent<Floor>().floorIndex;
|
// Collider[] wallOverlapCols = Physics.OverlapSphere(controller.option.target.position, controller.targetColliderRadius, wallMask);
|
||||||
|
|
||||||
LayerMask wallMask = LayerMask.GetMask("Floor Wall");
|
// if (wallOverlapCols.Length > 0)
|
||||||
Collider[] wallOverlapCols = Physics.OverlapSphere(controller.option.target.position, controller.targetColliderRadius, wallMask);
|
// {
|
||||||
|
// isChangeView = false;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
if (wallOverlapCols.Length > 0)
|
// //topCanvas.panel_toptoolbar.SetChangeViewButtonState(isChangeView);
|
||||||
{
|
//}
|
||||||
isChangeView = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//topCanvas.panel_toptoolbar.SetChangeViewButtonState(isChangeView);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void RaycastOnClickMachine()
|
private void RaycastOnClickMachine()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user