send move mand processing and testing correct pos player
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user