2024-12-12 17:18:12 +08:00
|
|
|
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();
|
2024-12-13 17:19:27 +08:00
|
|
|
test.CreateNpcHandler();
|
2024-12-12 17:18:12 +08:00
|
|
|
joinroomBtn.gameObject.SetActive(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void ChooseRoad()
|
|
|
|
{
|
|
|
|
test.NpcMove();
|
|
|
|
chooseroadBtn.gameObject.SetActive(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
void Update()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|