예제 #1
0
 public void Start()
 {
     Console.AddKeyword("networkDisconnect", this.Disconnect);
     Console.AddKeyword("networkConnect", this.Join);
     Console.AddKeyword("networkHost", this.Host);
     Console.AddKeyword("networkHostSimulated", this.HostSimulated);
     Console.AddKeyword("networkListen", this.Listen);
     Console.AddKeyword("networkChat", this.Chat);
     Console.AddKeyword("networkShowClients", this.ShowClients);
     Console.AddKeyword("networkShowEvents", this.ShowEvents);
     Console.AddKeyword("networkShowHistory", this.ShowHistory);
     Console.AddShortcut("networkDisconnect", "disconnect", "leave");
     Console.AddShortcut("networkConnect", "connect", "join");
     Console.AddShortcut("networkChat", "chat", "msg", "query");
     Console.AddShortcut("networkHostSimulated", "hostSimulated", "startServerSimulated");
     Console.AddShortcut("networkHost", "host", "startServer");
     Console.AddShortcut("networkListen", "listen");
     Console.AddShortcut("networkShowClients", "showClients", "clients");
     Console.AddShortcut("networkShowEvents", "showEvents", "events");
     Console.AddShortcut("networkShowHistory", "showHistory", "history");
     Console.AddShortcut("networkClientName", "clientName", "name");
     Console.AddCvar("networkServerIP", this, "serverIP", "Server IP");
     Console.AddCvar("networkServerPort", this, "serverPort", "Server Port");
     Console.AddCvar("networkClientName", this, "clientName", "Client Name");
     Networker.AddEvent("SyncData", this.SyncData);
     Networker.AddEvent("SyncClient", this.SyncClient);
     Networker.AddEvent("AddClient", this.AddClient);
     Networker.AddEvent("RemoveClient", this.RemoveClient);
 }
예제 #2
0
 public void Awake()
 {
     this.Setup();
     Console.AddShortcut("changeResolution", "res", "resolution");
     Console.AddShortcut("closeProgram", "quit");
     Console.AddShortcut("verticalSync", "vsync");
     Console.AddKeyword("hide", this.DisableGameObject, 1);
     Console.AddKeyword("show", this.EnableGameObject, 1);
     Console.AddKeyword("form", this.ToggleGameObject, 1);
     Console.AddKeyword("instance", this.InstanceGameObject, 1);
     Console.AddKeyword("destroy", this.DestroyGameObject, 1);
     Console.AddKeyword("closeProgram", this.CloseProgram);
     //Console.AddCvarMethod("changeResolution",this,"resolution","Change Resolution","",this.ChangeResolution);
     Console.AddCvar("maxfps", typeof(Application), "targetFrameRate", "Maximum FPS");
     Console.AddCvar("verticalSync", typeof(QualitySettings), "vSyncCount", "Vertical Sync");
 }