fix: Update show elesplayer,
This commit is contained in:
@@ -1,18 +1,47 @@
|
||||
using CSNetwork.Protocols.RPCData;
|
||||
using System.Data;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
public class GameController : MonoBehaviour
|
||||
{
|
||||
private static GameController instance;
|
||||
|
||||
[SerializeField] private CharacterCtrl characterPrefab;
|
||||
[SerializeField] private Transform ground;
|
||||
|
||||
Camera camera;
|
||||
|
||||
public static GameController Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
instance = new GameController();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if(instance == null)
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
camera = Camera.main;
|
||||
}
|
||||
|
||||
public void Log(string s)
|
||||
{
|
||||
Debug.LogError(s);
|
||||
}
|
||||
|
||||
public void InitCharacter(RoleInfo roleInfo)
|
||||
{
|
||||
CharacterCtrl character = Instantiate(characterPrefab, transform);
|
||||
|
||||
Reference in New Issue
Block a user