send move mand processing and testing correct pos player

This commit is contained in:
VDH
2025-09-09 18:22:47 +07:00
parent af8cb2b032
commit a4c4c4fa71
16 changed files with 30986 additions and 55 deletions
+8 -6
View File
@@ -8,9 +8,9 @@ public class GameController : MonoBehaviour
{
private static GameController instance;
[SerializeField] private CharacterCtrl characterPrefab;
[SerializeField] private CECHostPlayer characterPrefab;
//[SerializeField] private Transform ground;
CECHostPlayer hostPlayer;
Camera camera;
public static GameController Instance
@@ -24,7 +24,6 @@ public class GameController : MonoBehaviour
return instance;
}
}
private void Awake()
{
if(instance == null)
@@ -42,7 +41,10 @@ public class GameController : MonoBehaviour
{
Debug.LogError(s);
}
public CECHostPlayer GetHostPlayer()
{
return hostPlayer;
}
public void InitCharacter(cmd_self_info_1 info)
{
if(characterPrefab == null)
@@ -50,8 +52,8 @@ public class GameController : MonoBehaviour
Debug.LogError("null prefab");
return;
}
CharacterCtrl character = Instantiate(characterPrefab, transform);
character.InitCharacter(info);
hostPlayer = Instantiate(characterPrefab, transform);
hostPlayer.InitCharacter(info);
//Vector3 pos = new Vector3(info.pos.x, info.pos.y, info.pos.z);
//Vector3 posCam = pos;
//posCam.z -= 10f;