ar_tourism_flutter_unity/unity/VRProject2/Assets/zhl/zhlScripts/ShuiDiRen.cs
2025-05-14 17:04:13 +08:00

26 lines
609 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ShuiDiRen : MonoBehaviour
{
public Transform player;
public GameObject gameAnimation;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
transform.position=new Vector3(transform.position.x,player.position.y,transform.position.z);
}
public void PlayAnim()
{
gameAnimation.SetActive(true);
gameAnimation.transform.GetChild(0).GetComponent<Animator>().Play("1");
}
}