Skip to content

Commit

Permalink
hh
Browse files Browse the repository at this point in the history
h
  • Loading branch information
xxpniu committed Oct 30, 2016
1 parent 0ebbbe1 commit 904f5f2
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 7 deletions.
7 changes: 7 additions & 0 deletions client/Assets/CSharpScripts/GameGMTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ public void OnGUI ()
return;
GUI.BeginGroup (new Rect (Screen.width - 185, 55, 180, 25));
GUILayout.BeginHorizontal ();
int[] indexs = new int[]{ 0, 1, 2 };
foreach (var i in indexs)
{
if(GUILayout.Button(string.Format("{0}",i))){
UAppliaction.S.SetServer(i);
}
}
level = GUILayout.TextField (level,GUILayout.Width(100));
if (GUILayout.Button("GM", GUILayout.Width(60)))
{
Expand Down
12 changes: 9 additions & 3 deletions client/Assets/CSharpScripts/UAppliaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,18 @@ public List<T> Deserialize<T>() where T : ExcelConfig.JSONConfigBase

public void GetServer()
{
var serverInfo = ResourcesManager.Singleton.LoadText("ServerInfo.json");
var data = JsonReader.Read(serverInfo);
Debug.Log(serverInfo);
#if !UNITY_EDITOR
index =0;
#endif
SetServer(index);
}

public void SetServer(int index)
{
var serverInfo = ResourcesManager.Singleton.LoadText("ServerInfo.json");
var data = JsonReader.Read(serverInfo);
Debug.Log(serverInfo);

var server = data["Servers"].GetAt(index);
ServerHost = server["Host"].AsString();
ServerPort = server["Port"].AsInt();
Expand Down
9 changes: 9 additions & 0 deletions client/Assets/Gizmos.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions client/Assets/StreamingAssets.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified client/ProjectSettings/ProjectSettings.asset
Binary file not shown.
2 changes: 1 addition & 1 deletion client/ProjectSettings/ProjectVersion.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
m_EditorVersion: 5.4.2f2
m_EditorVersion: 5.4.1f1
m_StandardAssetsVersion: 0
8 changes: 5 additions & 3 deletions client/client.userprefs
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<Properties StartupItem="Assembly-CSharp.csproj" RefactoringSettings.EnableRefactorings="True">
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" PreferredExecutionTarget="Unity.Instance.Unity Editor" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/CSharpScripts/Components/AstarGridBase.cs">
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/CSharpScripts/GameGMTools.cs">
<Files>
<File FileName="Assets/CSharpScripts/GameGates/NotifyPlayer.cs" Line="190" Column="37" />
<File FileName="Assets/CSharpScripts/XmlParser.cs" Line="40" Column="30" />
<File FileName="Assets/CSharpScripts/GameGates/NotifyPlayer.cs" Line="1" Column="1" />
<File FileName="Assets/CSharpScripts/EditorGate.cs" Line="1" Column="1" />
<File FileName="Assets/CSharpScripts/EditorStarter.cs" Line="1" Column="1" />
<File FileName="Assets/Editor/LayoutEditorWindow.cs" Line="1" Column="1" />
<File FileName="Assets/CSharpScripts/UGate.cs" Line="1" Column="1" />
<File FileName="Assets/CSharpScripts/GameGates/LoginGate.cs" Line="1" Column="1" />
<File FileName="Assets/CSharpScripts/Components/AstarGridBase.cs" Line="113" Column="16" />
<File FileName="Assets/CSharpScripts/GameViews/UPerceptionView.cs" Line="47" Column="11" />
<File FileName="Assets/CSharpScripts/GameGMTools.cs" Line="63" Column="45" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
Expand Down

0 comments on commit 904f5f2

Please sign in to comment.