简单的下落音游

This commit is contained in:
xinkl
2025-11-09 07:45:54 +08:00
parent d948b725a3
commit cc1b427d36
21 changed files with 1262 additions and 127 deletions

View File

@@ -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