private void Awake() { System.Net.IPAddress address; int port = 8080; address = System.Net.IPAddress.Parse("127.0.0.1"); if (GAME_MODE == GameMode.Server) { gServer = new GServer(address, port, this); Quaternion camRot = Quaternion.Euler(45f, 0, 0); Instantiate(cameraOnHintPrefab, spawnPoint.transform.position, camRot); isIntancenate = true; } else if (GAME_MODE == GameMode.Client) { gClient = new GClient(address, port, this); if (gClient.isConnected) { messages = new Queue <NetworkCryptor.NetCommand>(); connectedCharcters = new List <Character>(); ccamera = GameAdmin.Instantiate(CameraOnHintPrefab, SpawnPoint.position, CameraOnHintPrefab.transform.rotation); isIntancenate = true; } } else { Debug.Log("GameMode: None, do u forget set it or it editor?"); } }
public GTcpClientOnClient(TcpClient client, GameAdmin gameAdmin) : base(client) { this.gameAdmin = gameAdmin; }
//private List<Character> characters; public GServer(IPAddress ip, int port, GameAdmin gameAdmin) { this.gameAdmin = gameAdmin; Initialize(ip, port); }