26 lines
609 B
C#
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");
|
|
}
|
|
}
|