// Use this for initialization void Start() { // Generate "Tiles" // PlacementManager p = TerrainController.Instance.GetPlacementManager(""); // // GameObject tileParent = new GameObject("Tiles"); // // for (int i = 0; i < 20; i++) { // for (int j = 0; j < 20; j++) { // Vector3 position = p.RequestPlacement(new Vector3(startPos[0] + i * (size + 1f), 0, startPos[2] + j * (size + 1f))); // GameObject cube = CreateCube(position); // cube.name = "Tile_" + (i * 20 + j).ToString(); // tileList.Add(cube); // cube.transform.parent = tileParent.transform; // // } // } speciesPrefabs.Add("African Elephant", Resources.Load(Constants.PREFAB_RESOURCES_PATH + "African Elephant")); ConnectionManager cManager = GameObject.Find("MainObject").GetComponent <ConnectionManager>(); if (cManager) { RequestReady request = new RequestReady(); request.Send(true); cManager.Send(request); } }
public void onReady() { Debug.Log("onReady -- "); if (myInfo.equalsType(Common.USER_TYPE.MASTER)) { if (isAllReady()) { RequestStart req = new RequestStart(gameNo, roomNo); SocketManager.Instance().sendMessage(req); } else { // GameManager.Instance().showAlert("모두 준비상태가 되어야 시작가능합니다.", false, null,false); showAlert("errorStart", "모두 준비상태가 되어야 시작가능합니다.", false, false, (AlertData data, bool isOn, string fieldText) => { }); } } else { bool isReady = true; if (myInfo.state == (int)Common.USER_STATE.READY) { isReady = false; } RequestReady req = new RequestReady(isReady, gameNo, roomNo); SocketManager.Instance().sendMessage(req); } }
// Use this for initialization void Start() { // Generate "Tiles" // PlacementManager p = TerrainController.Instance.GetPlacementManager(""); // // GameObject tileParent = new GameObject("Tiles"); // // for (int i = 0; i < 20; i++) { // for (int j = 0; j < 20; j++) { // Vector3 position = p.RequestPlacement(new Vector3(startPos[0] + i * (size + 1f), 0, startPos[2] + j * (size + 1f))); // GameObject cube = CreateCube(position); // cube.name = "Tile_" + (i * 20 + j).ToString(); // tileList.Add(cube); // cube.transform.parent = tileParent.transform; // // } // } speciesPrefabs.Add("African Elephant", Resources.Load(Constants.PREFAB_RESOURCES_PATH + "African Elephant")); ConnectionManager cManager = GameObject.Find("MainObject").GetComponent<ConnectionManager>(); if (cManager) { RequestReady request = new RequestReady(); request.Send(true); cManager.Send(request); } }
void ObserveSelection(ReactiveFile file) { serializer.Deserialize(new FileInfo(file.Path)) .ContinueWith(task => { RequestReady?.Invoke(this, task.Result); }); }
public void RequestReady() { player = players[0]; int readyPlayer = int.Parse(player.tag); RequestReady ready = new RequestReady(); ready.send(readyPlayer); cManager.send(ready); Debug.Log("Sent ready request"); }
public bool SendReadyRequest() { if (cManager && cManager.IsConnected()) { RequestReady request = new RequestReady(); request.send(); cManager.send(request); return(true); } return(false); }