_xiaofang/xiaofang/Assets/Script/hylScripts/TestButton.cs
2024-12-29 15:03:13 +08:00

40 lines
781 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class TestButton : MonoBehaviour
{
public test test;
public Button chooseroadBtn;
public Button joinroomBtn;
// Start is called before the first frame update
void Start()
{
joinroomBtn.onClick.AddListener(JoinRoom);
chooseroadBtn.onClick.AddListener(ChooseRoad);
}
public void JoinRoom()
{
//test.JoinRoom();
test.CreateNpcHandler();
joinroomBtn.gameObject.SetActive(false);
}
public void ChooseRoad()
{
test.NpcMove();
chooseroadBtn.gameObject.SetActive(false);
}
// Update is called once per frame
void Update()
{
}
}