fix:代码提交
This commit is contained in:
33
Assets/Scripts/Ui/LookAt.cs
Normal file
33
Assets/Scripts/Ui/LookAt.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class LookAt : MonoBehaviour
|
||||
{
|
||||
private GameObject Player;
|
||||
private CameraRover cameraRover;
|
||||
void Awake()
|
||||
{
|
||||
Player = GameObject.Find("Player");
|
||||
if (Player != null)
|
||||
{
|
||||
// 获取 Player 上挂载的 CameraRover 脚本实例
|
||||
cameraRover = Player.GetComponent<CameraRover>();
|
||||
}
|
||||
}
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void OnMouseDown() {
|
||||
cameraRover.WebCallOpenItem("iconCameraBlue_1");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user