48 lines
1.3 KiB
C#
48 lines
1.3 KiB
C#
using BrewMonster.UI;
|
|
using CSNetwork.Protocols.RPCData;
|
|
using PerfectWorld.Scripts.Managers;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using UnityEngine;
|
|
|
|
public class CanvasController : MonoBehaviour
|
|
{
|
|
[SerializeField] private ScreenLogin screenLogin;
|
|
[SerializeField] private SelecScreenCharacter screenCharacter;
|
|
[SerializeField] private GameObject bgr;
|
|
[SerializeField] private GameController gameController;
|
|
|
|
GameObject screenLoginOb;
|
|
GameObject screenCharacterOb;
|
|
private SynchronizationContext context;
|
|
|
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
|
void Start()
|
|
{
|
|
bgr.gameObject.SetActive(true);
|
|
screenLogin.gameObject.SetActive(true);
|
|
screenCharacter.gameObject.SetActive(false);
|
|
context = SynchronizationContext.Current;
|
|
}
|
|
|
|
public void ShowScreenSelectCharacter(List<RoleInfo> roleInfos)
|
|
{
|
|
context.Post(_ =>
|
|
{
|
|
screenLogin.gameObject.SetActive(false);
|
|
screenCharacter.gameObject.SetActive(true);
|
|
screenCharacter.InitScreen(roleInfos, OnClickSelectChacter);
|
|
}, null);
|
|
}
|
|
|
|
private void OnClickSelectChacter(RoleInfo roleInfo)
|
|
{
|
|
|
|
}
|
|
|
|
private void OnDestroy()
|
|
{
|
|
|
|
}
|
|
}
|