public void ResponseSpeciesAction(ExtendedEventArgs eventArgs) { ResponseSpeciesActionEventArgs args = eventArgs as ResponseSpeciesActionEventArgs; if (args.action == 0) { Dictionary <int, int> speciesList = new Dictionary <int, int>(); foreach (string item in args.selectionList.Split(',')) { string[] pair = item.Split(':'); int species_id = int.Parse(pair[0]); int biomass = int.Parse(pair[1]); speciesList.Add(species_id, biomass); Debug.Log(species_id + " " + biomass); } ConnectionManager cManager = mainObject.GetComponent <ConnectionManager>(); if (cManager) { RequestSpeciesAction request = new RequestSpeciesAction(); request.Send(1, speciesList); cManager.Send(request); } } }
public void Create() { ConnectionManager cManager = mainObject.GetComponent<ConnectionManager>(); if (cManager) { RequestWorldMenuAction request = new RequestWorldMenuAction(); request.CreateAction(0, "", 1, "Savanna", 1, ""); cManager.Send(request); // messageBox = mainObject.GetComponent<Main>().CreateMessageBox("Creating World..."); // Get Default Species RequestSpeciesAction sRequest = new RequestSpeciesAction(); sRequest.Send(0, 0); cManager.Send(sRequest); } }
public void Create() { ConnectionManager cManager = mainObject.GetComponent <ConnectionManager>(); if (cManager) { RequestWorldMenuAction request = new RequestWorldMenuAction(); request.CreateAction(0, "", 1, "Savanna", 1, ""); cManager.Send(request); // messageBox = mainObject.GetComponent<Main>().CreateMessageBox("Creating World..."); // Get Default Species RequestSpeciesAction sRequest = new RequestSpeciesAction(); sRequest.Send(0, 0); cManager.Send(sRequest); } }
public void ResponseSpeciesAction(ExtendedEventArgs eventArgs) { ResponseSpeciesActionEventArgs args = eventArgs as ResponseSpeciesActionEventArgs; if (args.action == 0) { Dictionary<int, int> speciesList = new Dictionary<int, int>(); foreach (string item in args.selectionList.Split(',')) { string[] pair = item.Split(':'); int species_id = int.Parse(pair[0]); int biomass = int.Parse(pair[1]); speciesList.Add(species_id, biomass); Debug.Log(species_id + " " + biomass); } ConnectionManager cManager = mainObject.GetComponent<ConnectionManager>(); if (cManager) { RequestSpeciesAction request = new RequestSpeciesAction(); request.Send(1, speciesList); cManager.Send(request); } } }