简单的下落音游
This commit is contained in:
@@ -33,11 +33,16 @@ public class CameraFollow : MonoBehaviour
|
||||
{
|
||||
var mousePos = Mouse.current.position.ReadValue();
|
||||
Ray ray = Camera.main.ScreenPointToRay(mousePos);
|
||||
Physics.Raycast(ray,out RaycastHit hit);
|
||||
Physics.Raycast(ray, out RaycastHit hit);
|
||||
|
||||
if (hit.collider != null)
|
||||
{
|
||||
GameObject obj = hit.collider.gameObject;
|
||||
// if (obj.GetComponent<Note>() != null)
|
||||
// {
|
||||
// if (obj.GetComponent<Note>().hitable)
|
||||
// MusicGame.Instance.onNoteHit(obj.GetComponent<Note>().Uid);
|
||||
// }
|
||||
Debug.Log($"点击到了物体: {obj.name}");
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user