本文整理汇总了C#中GameData.getUser方法的典型用法代码示例。如果您正苦于以下问题:C# GameData.getUser方法的具体用法?C# GameData.getUser怎么用?C# GameData.getUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameData
的用法示例。
在下文中一共展示了GameData.getUser方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: create
/// <summary>
/// Erzeugt einen neuen Trupp
/// </summary>
/// <param name="ID">ID</param>
/// <param name="data">GameData</param>
/// <returns></returns>
public static Troop create(int ID, GameData data)
{
MySqlDataReader Reader = data.Query("SELECT * FROM `PX_mom-troops` WHERE `ID` = '" + ID + "'");
Reader.Read();
int type = (int)Reader["Class"];
string name = (string)Reader["Name"];
User UID = data.getUser((int)Reader["UID"]);
int power = (int)Reader["Power"];
int health = (int)Reader["health"];
int team = (int)Reader["team"];
WorldPoint position = new WorldPoint((string)(Reader["worldpos"]));
string states = (string)Reader["states"];
int power2 = (int)Reader["Power2"];
int power3 = (int)Reader["Power3"];
int power4 = (int)Reader["Power4"];
int resistend1 = (int)Reader["Resistend1"];
int resistend2 = (int)Reader["Resistend2"];
int resistend3 = (int)Reader["Resistend3"];
int resistend4 = (int)Reader["Resistend4"];
int hide = (int)Reader["hide"];
string verhalten = (string)Reader["verhalten"];
TroopClass typeClass = data.getTroopType(type);
Troop troop = new Troop(ID, typeClass, UID, name, team, states);
troop.position = position;
troop.health = health;
troop.power = power;
troop.power2 = power2;
troop.power3 = power3;
troop.power4 = power4;
troop.resistend1 = resistend1;
troop.resistend2 = resistend2;
troop.resistend3 = resistend3;
troop.resistend4 = resistend4;
troop.hide = hide;
troop.verhalten = verhalten;
troop.fighterTyp = FighterType.TROOP;
Reader.Close();
return troop;
}