本文整理汇总了C#中WinterLeaf.Engine.Classes.View.Creators.ObjectCreator.setJoinPassword方法的典型用法代码示例。如果您正苦于以下问题:C# ObjectCreator.setJoinPassword方法的具体用法?C# ObjectCreator.setJoinPassword怎么用?C# ObjectCreator.setJoinPassword使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WinterLeaf.Engine.Classes.View.Creators.ObjectCreator
的用法示例。
在下文中一共展示了ObjectCreator.setJoinPassword方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: createAndConnectToLocalServer
public static bool createAndConnectToLocalServer(string serverType, string level)
{
if (!createServer(serverType, level))
return false;
GameConnection conn = new ObjectCreator("GameConnection", "ServerConnection", t3d.sGlobal["$Pref::Server::Net::ClientGameConnectionModelClass"]).Create();
((SimGroup) "RootGroup").add(conn);
conn.setConnectArgs(t3d.sGlobal["$pref::Player::Name"]);
conn.setJoinPassword(t3d.sGlobal["$Client::Password"]);
if (conn.connectLocal() != string.Empty)
{
conn.delete();
destroyServer();
return false;
}
return true;
}
示例2: connect
//
//----------------------------------------------------------------------------
//Helper functions
//----------------------------------------------------------------------------
public static void connect(string server)
{
GameConnection conn = new ObjectCreator("ServerConnection").Create();
((SimGroup) "RootGroup").add(conn);
conn.setConnectArgs(omni.sGlobal["$pref::Player::Name"]);
conn.setJoinPassword(omni.sGlobal["$Client::Password"]);
conn.connect(server);
}
示例3: join
public void join()
{
Util.cancelServerQuery();
int index = ((GuiTextListCtrl) "JS_serverList").getSelectedId();
// The server info index is stored in the row along with the
// rest of displayed info.
if (Util.setServerInfo((uint) index))
{
((GuiCanvas) "Canvas").setContent("LoadingGui");
((GuiProgressBitmapCtrl) "LoadingProgress").setValue("1");
((GuiTextCtrl) "LoadingProgressTxt").setValue("WAITING FOR SERVER");
((GuiCanvas) "Canvas").repaint(-1);
if ("ServerConnection".isObject())
"ServerConnection".delete();
GameConnection conn = new ObjectCreator("GameConnection", "ServerConnection").Create();
conn.setConnectArgs(sGlobal["$pref::Player::Name"]);
conn.setJoinPassword(sGlobal["$Client::Password"]);
conn.connect(sGlobal["$ServerInfo::Address"]);
}
}