public void Create() { string name = NameInput.GetComponent <InputField> ().text; List <Dropdown.OptionData> types = TypeDrop.GetComponent <Dropdown> ().options; string type = types [TypeDrop.GetComponent <Dropdown> ().value].text; List <Dropdown.OptionData> races = RaceDrop.GetComponent <Dropdown> ().options; string race = races [RaceDrop.GetComponent <Dropdown> ().value].text; GameObject tp_player = GameObject.FindGameObjectWithTag("Player"); int id = tp_player.GetComponent <Player> ().PlayerID; string[] content = new string[] { "('" + id + "','" + name + "','3','" + race + "','" + type + "','" + Att_HP + "','" + Att_HP + "','16','1/1/1/1','0','" + Str + "','" + Con + "','" + Dex + "','" + Int + "','" + Luck + "','0/0/0/0/0/0/0/0/0/0','0/0/0/0/0/0/0/0')" }; print(content [0]); RaiseEventOptions opt = new RaiseEventOptions(); opt.Receivers = ReceiverGroup.MasterClient; PhotonNetwork.RaiseEvent(16, content, false, opt); }
public void ChangeInput() { switch (RaceDrop.GetComponent <Dropdown> ().value) { case 0: Int = 5; Con = 4; Str = Dex = Luck = 2; break; case 1: Int = 5; Dex = 4; Str = Con = Luck = 2; break; case 2: Con = 5; Str = 4; Int = Dex = Luck = 2; break; case 3: Con = 5; Dex = 4; Str = Dex = Luck = 2; break; case 4: Str = 5; Dex = 4; Int = Con = Luck = 2; break; case 5: Str = 5; Con = 4; Int = Dex = Luck = 2; break; case 6: Luck = 5; Dex = 4; Str = Con = Int = 2; break; case 7: Luck = 5; Int = 4; Str = Dex = Con = 2; break; case 8: Dex = 5; Luck = 4; Str = Con = Int = 2; break; case 9: Dex = 5; Int = 4; Str = Con = Luck = 2; break; } AttributePoints = 10; UpdateAll(); }