_TheStrongestSnail/TheStrongestSnail/Assets/Scripts/otherWoniu.cs

21 lines
515 B
C#
Raw Normal View History

2024-11-18 16:53:39 +08:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class otherWoniu : MonoBehaviour
{
public List<GameObject> EndPosList;
// Start is called before the first frame update
void Start()
{
//OtherWoniuMove();
}
public void OtherWoniuMove()
{
int Index = Random.Range(0, EndPosList.Count);
transform.GetComponent<PlayerMove>().EndPos = EndPosList[Index].transform;
transform.GetComponent<PlayerMove>().StartMove();
}
}