public void StartServer(List <GameObject> setControllerStyles, List <Texture2D> setExportTextures, string thisGameName, Texture2D setBackgroundTexture) { networking = GameObject.Find("JoviosObject").GetComponent <JoviosNetworking> (); networking.parser = this; if (setBackgroundTexture != null) { backgroundTexture = setBackgroundTexture; } controllerStyles = new Dictionary <string, GameObject>(); foreach (GameObject go in setControllerStyles) { controllerStyles.Add(go.name, go); } StartServer(thisGameName); }
void OnGUI() { GUI.Box(new Rect(0, 0, 100, 50), jovios.gameName); if (GUI.Button(new Rect(0, 50, 100, 50), "Start Server")) { jovios.StartServer(); networking = GameObject.Find("JoviosObject").GetComponent <JoviosNetworking>(); } if (GUI.Button(new Rect(0, 100, 100, 50), "find")) { networking.LoadGameStat("cards", 0, "GameName = 'Cards' AND Domain = 'Cards'"); } is_black = GUI.Toggle(new Rect(100, 0, 100, 50), is_black, "black?"); if (is_black) { kingdom = "black"; } else { kingdom = "white"; } GUI.Box(new Rect(100, 50, 100, 25), "Category"); phylum = GUI.TextArea(new Rect(100, 75, 100, 25), phylum); GUI.Box(new Rect(100, 100, 100, 25), "Sub Category"); statClass = GUI.TextArea(new Rect(100, 125, 100, 25), statClass); GUI.Box(new Rect(100, 150, 100, 25), "Age (int)"); order = GUI.TextArea(new Rect(100, 175, 100, 25), order); //family = GUI.TextArea(new Rect(100,200,100,50), family); //genus = GUI.TextArea(new Rect(100,250,100,50), genus); if (kingdom == "black") { GUI.Box(new Rect(100, 300, 100, 25), "#White Cards"); species = GUI.TextArea(new Rect(100, 325, 100, 25), species); } if (GUI.Button(new Rect(100, 350, 100, 50), "set")) { networking.SaveGameStat("Cards", 0, species, "Cards", kingdom, phylum, order, family, statClass, genus); } }
public void Test() { JoviosNetworking networking = GameObject.Find("JoviosObject").GetComponent <JoviosNetworking> (); networking.SaveGameStat("12", 1, "test2", "domain", "kingdom", "phylum", "order", "family", "class", "genus"); }