This commit is contained in:
happy44300
2018-10-07 16:57:14 +02:00
2 changed files with 9 additions and 14 deletions
+9 -6
View File
@@ -23,9 +23,6 @@ public class NetworkManager : NetworkLobbyManager
networkAddress = "localhost";
networkPort = 4444;
StartHost();
foreach (string s in Input.GetJoystickNames())
print(s);
}
private void Update()
@@ -329,9 +326,9 @@ public class NetworkManager : NetworkLobbyManager
}
else
{
GameObject spawnPoint = GameObject.Find("SpawnPoint(Clone)");
pController.transform.position = spawnPoint.transform.position;
Destroy(spawnPoint);
Vector3 pos = GameObject.Find("GameManager").GetComponent<GameManager>().RespawnPosition;
print(pos);
pController.transform.position = new Vector3(pos.x + player * 2, pos.y, pos.z);
}
pController.gameObject.GetComponent<Rigidbody2D>().velocity = new Vector3(0, 5, 0);
}
@@ -347,4 +344,10 @@ public class NetworkManager : NetworkLobbyManager
return base.OnLobbyServerSceneLoadedForPlayer(lobbyPlayer, gamePlayer);
}
public override void OnLobbyServerPlayersReady()
{
gameIsRunning = true;
base.OnLobbyServerPlayersReady();
}
}