本文整理汇总了C#中SFSObject.GetUtfString方法的典型用法代码示例。如果您正苦于以下问题:C# SFSObject.GetUtfString方法的具体用法?C# SFSObject.GetUtfString怎么用?C# SFSObject.GetUtfString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SFSObject
的用法示例。
在下文中一共展示了SFSObject.GetUtfString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: fromSFSObject
public void fromSFSObject(SFSObject dailyMeeting)
{
this.id_proyecto = dailyMeeting.GetLong("id_proyecto");
this.nick = dailyMeeting.GetUtfString("nick");
this.ayer = dailyMeeting.GetUtfString("ayer");
this.hoy = dailyMeeting.GetUtfString("hoy");
this.inconvenientes = dailyMeeting.GetUtfString("inconvenientes");
this.fecha = dailyMeeting.GetLong("fecha");
}
示例2: fromSFSObject
public override void fromSFSObject(SFSObject item)
{
this.id_criterio = item.GetLong ("Id_Criteria");
this.id_test= item.GetLong("Id_Test");
this.metodo= item.GetUtfString("Metodo");
this.clase = item.GetUtfString("Clase");
this.estado= item.GetUtfString("Estado");
this.descripcion = item.GetUtfString("Descripcion");
}
示例3: fromSFSObject
public void fromSFSObject(SFSObject item)
{
this.id_test = item.GetLong("id_test");
this.fecha_hora = System.DateTime.Parse(item.GetUtfString("fecha_hora"));
this.info_ejecucion = item.GetUtfString("info_ejecucion");
if (info_ejecucion != null && !info_ejecucion.Equals ("")) {
string m = info_ejecucion.Split ('^') [0];
string s = info_ejecucion.Split ('^') [1];
this.setMensaje (m.Substring (0, m.Length - 11));
this.setStackTrace (s);
}
this.estado = item.GetUtfString("estado");
this.entorno = item.GetUtfString("entorno");
this.time = item.GetUtfString("time");
}
示例4: fromSFSObject
public override void fromSFSObject(SFSObject item)
{
associatedTests = new List<Test> ();
this.id_Criteria = item.GetLong("Id_Criteria");
this.id_Story = item.GetLong("Id_Story");
this.descripcion = item.GetUtfString ("Descripcion");
this.titulo = item.GetUtfString ("Titulo");
this.prioridad = item.GetLong("Prioridad");
ISFSArray tests=item.GetSFSArray("listaTests");
if(tests != null)
foreach(SFSObject test in tests)
{
Test t=new Test();
t.fromSFSObject(test);
associatedTests.Add(t);
}
}
示例5: fromSFSObject
public override void fromSFSObject(SFSObject item)
{
this.id_Task = item.GetLong ("id_Task");
this.id_Story=item.GetLong("id_Story");
this.descripcion = item.GetUtfString ("descripcion");
this.prioridad = item.GetInt ("prioridad");
this.responsable = item.GetUtfString ("responsable");
this.estado = item.GetUtfString ("estado");
this.t_Total = item.GetInt ("t_Total");
this.t_Estimado = item.GetInt ("t_Estimado");
this.titulo = item.GetUtfString ("titulo");
ISFSArray t = item.GetSFSArray ("testsAsociados");
foreach (SFSObject s in t) {
this.idTests.Add (s.GetLong ("Id_Test"));
}
// falta el burndownchart
}
示例6: onLoggedIn
public void onLoggedIn(SFSObject aLoginData,SFSArray aHorses) {
string challengeGoals = aLoginData.GetUtfString("ChallengeGoals");
this.appleID = aLoginData.GetUtfString("AppleID");
this.facebookID = Convert.ToString(aLoginData.GetLong("FacebookID"));
this.googleID = aLoginData.GetUtfString("GoogleID");
this.playerID = aLoginData.GetInt("ID");
this.lastLogin = aLoginData.GetInt("LastLogin");
this.playerName = aLoginData.GetUtfString("Username");
this.referralRewardsReceived = aLoginData.GetInt("RewardsReceived");
this.softCurrency = aLoginData.GetInt("SoftCurrency");
this.hardCurrency = aLoginData.GetInt("HardCurrency");
this.privilege = aLoginData.GetInt("Privilege");
unpackHorses(aHorses);
this.selectedRaceHorse = this.horses[0];
this.loggedIn = true;
SFSObject obj = new SFSObject();
obj.PutInt("l",selectedRaceHorse.level);
SmartfoxConnectionHandler.REF.setMyName(this.playerName);
SmartfoxConnectionHandler.REF.setMyHorseUserVar(selectedRaceHorse.compressedString(0));
SmartfoxConnectionHandler.REF.sendMessage("rf2",obj);
}
示例7: Brand
public Brand(SFSObject aObject) {
id = aObject.GetInt("ID");
owner = aObject.GetInt("Ow");
Debug.Log (aObject.ToJson());
try {
fb = (long) Convert.ToInt64(aObject.GetFloat("FB"));
} catch(Exception e) {
try {
fb = aObject.GetLong("FB");
} catch(Exception e2) {
fb = (long) aObject.GetDouble("FB");
}
}
brand = aObject.GetUtfString("B");
}
示例8: OnExtensionResponse
private void OnExtensionResponse(BaseEvent e)
{
print("OnLoginError");
string cmd = e.Params.GetValue<string>("cmd");
ISFSObject objIn = new SFSObject();
if (cmd == CMD_SIGNUP)
{
if (objIn.ContainsKey("errorMessage"))
Debug.LogError("Signup error : " + objIn.GetUtfString("errorMessage"));
else if(objIn.ContainsKey("success"))
Debug.Log("Signup successful");
else
Debug.LogError("Signup unknown error");
}
}
示例9: HandlePlayerTransformResponse
private void HandlePlayerTransformResponse(SFSObject sfsdata)
{
int id = sfsdata.GetInt("player");
float px = sfsdata.GetFloat("position.x");
float py = sfsdata.GetFloat("position.y");
float pz = sfsdata.GetFloat("position.z");
float rx = sfsdata.GetFloat("rotation.x");
float ry = sfsdata.GetFloat("rotation.y");
float rz = sfsdata.GetFloat("rotation.z");
float rw = sfsdata.GetFloat("rotation.w");
//hack, needs to be fixed
if (!GameManager.gameManager.Players.ContainsKey(id) && id != SFSInstance.MySelf.Id) {
//GameManager.gameManager.AddRemotePlayer(id, "[!]ERROR[!]" + id.ToString());
//early out
Debug.LogWarning("Null Player sending messages: " + id.ToString());
return;
}
Dictionary<string, object> data = new Dictionary<string, object>();
data.Add("id", id);
data.Add("type", sfsdata.GetUtfString("type"));
data.Add("position.x", px);
data.Add("position.y", py);
data.Add("position.z", pz);
data.Add("rotation.x", rx);
data.Add("rotation.y", ry);
data.Add("rotation.z", rz);
data.Add("rotation.w", rw);
OnEvent("transform", data);
}
示例10: GameListRemoveResponse
private void GameListRemoveResponse(SFSObject data)
{
string game = data.GetUtfString("game");
OnEvent("roomremove", game);
}
示例11: fromSFSObjectSinUS
public void fromSFSObjectSinUS(SFSObject us)
{
this.id_sprint=us.GetLong("Id_Sprint");
this.id_proyecto=us.GetLong("id_Proyecto");
this.estado=us.GetUtfString("estado");
this.fechaInicio=System.DateTime.Parse(us.GetUtfString("fechaInicio"));//new System.DateTime(us.GetLong ("fechaInicio"));
this.fechaFin=System.DateTime.Parse(us.GetUtfString("fechaFin"));//new System.DateTime(us.GetLong ("fechaFin"));
this.titulo=us.GetUtfString("titulo");
this.cerrado = us.GetBool("cerrado");
string s = us.GetUtfString ("fecha_ultimo_cambio");
if(!s.Equals(""))
this.fecha_ultimo_cambio = System.DateTime.Parse(s);
Debug.Log (this.fecha_ultimo_cambio.ToString ());
}
示例12: Start
void Start()
{
Debug.Log("start game lobby");
smartFox = SmartFoxConnection.Connection;
currentActiveRoom = smartFox.LastJoinedRoom;
smartFox.AddLogListener(LogLevel.INFO, OnDebugMessage);
screenW = Screen.width;
AddEventListeners();
username = smartFox.MySelf.Name;
lobbyGameInfo = (SFSObject)currentActiveRoom.GetVariable("gameInfo").GetSFSObjectValue();
maxPlayers = currentActiveRoom.MaxUsers;
host = lobbyGameInfo.GetUtfString("host");
numberOfTeams = lobbyGameInfo.GetInt("numTeams");
Debug.Log("start number of teams: " + numberOfTeams);
if (GameValues.isHost)
currentTeams = new int[8];
teams = (SFSArray)lobbyGameInfo.GetSFSArray("teams");
playerPerTeam = numberOfPlayers / numberOfTeams;
gameLength = (int)lobbyGameInfo.GetInt("gameLength");
//Make Contents for the popup gameLength list
gameLengthList[0] = (new GUIContent("60"));
gameLengthList[1] = (new GUIContent("120"));
gameLengthList[2] = (new GUIContent("300"));
gameLengthList[3] = (new GUIContent("600"));
//Make Contents for the popup number of teams list
teamNumberList[0] = (new GUIContent("2"));
teamNumberList[1] = (new GUIContent("3"));
teamNumberList[2] = (new GUIContent("4"));
teamNumberList[3] = (new GUIContent("5"));
teamNumberList[4] = (new GUIContent("6"));
teamNumberList[5] = (new GUIContent("7"));
teamNumberList[6] = (new GUIContent("8"));
//Set team scroll positions to zero
for(int i = 0; i < 8; i++)
{
teamScrollPositions.Add(Vector2.zero);
}
//Make a gui style for the lists
listStyle.normal.textColor = Color.white;
Texture2D tex = new Texture2D(2, 2);
Color[] colors = new Color[4];
for (int i = 0; i < 4; i++)
{
colors[i] = Color.white;
}
tex.SetPixels(colors);
tex.Apply();
listStyle.hover.background = tex;
listStyle.onHover.background = tex;
listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;
if (GameValues.isHost)
{
currentIDs.AddInt(0);
GameValues.playerID = 0;
GameValues.teamNum = 0;
currentTeams[0]++;
List<UserVariable> uData = new List<UserVariable>();
uData.Add(new SFSUserVariable("playerID", GameValues.playerID));
uData.Add(new SFSUserVariable("playerTeam", GameValues.teamNum));
smartFox.Send(new SetUserVariablesRequest(uData));
SFSObject gameInfo = (SFSObject)currentActiveRoom.GetVariable("gameInfo").GetSFSObjectValue();
//send back to store on server
List<RoomVariable> rData = new List<RoomVariable>();
gameInfo.PutSFSArray("playerIDs", currentIDs);
rData.Add(new SFSRoomVariable("gameInfo", gameInfo));
smartFox.Send(new SetRoomVariablesRequest(rData));
}
if (currentActiveRoom.ContainsVariable("lastGameScores"))
{
Debug.Log("scores from last game are present, adding to the message window...");
//write out the last games scores to the chat window
//format:
//scores: int array
//winner: string
SFSObject lastGameData = (SFSObject)currentActiveRoom.GetVariable("lastGameScores").GetSFSObjectValue();
int[] scoresArray = lastGameData.GetIntArray("scores");
string[] teamColors = lastGameData.GetUtfStringArray("teamColors");
messages.Add("Previous Game's Scores");
messages.Add("The Winner is... " + lastGameData.GetUtfString("winner").ToString());
for (int i = 0; i < scoresArray.Length; i++)
{
string teamName = teamColors[i] + " Team";
messages.Add(teamName + "\tscored " + scoresArray[i].ToString() + " points.");
}
}
//.........这里部分代码省略.........
示例13: fromSFSObject
public override void fromSFSObject(SFSObject item)
{
this.id_sprint=item.GetLong("Id_Sprint");
this.id_proyecto=item.GetLong("id_Proyecto");
this.estado=item.GetUtfString("estado");
this.fechaInicio=System.DateTime.Parse(item.GetUtfString("fechaInicio"));//new System.DateTime(us.GetLong ("fechaInicio"));
this.fechaFin=System.DateTime.Parse(item.GetUtfString("fechaFin"));//new System.DateTime(us.GetLong ("fechaFin"));
this.titulo=item.GetUtfString("titulo");
this.cerrado = item.GetBool("cerrado");
string s = item.GetUtfString ("fecha_ultimo_cambio");
if(!s.Equals(""))
this.fecha_ultimo_cambio = System.DateTime.Parse(s);
ISFSArray stories=item.GetSFSArray("listaStories");
foreach(SFSObject story in stories)
{
UserStory UserStory=new UserStory();
UserStory.fromSFSObject(story);
listaStories.Add(UserStory);
}
Debug.Log (this.fecha_ultimo_cambio.ToString ());
}
示例14: SpawnResponse
private void SpawnResponse( SFSObject sfsdata )
{
Debug.Log(sfsdata.GetDump());
int id = sfsdata.GetInt ( "playerid" );
if (id != SFSInstance.MySelf.Id)
{
GameManager.gameManager.assignRemoteHealth(id, sfsdata.GetFloat("health"));
}
else
{
Dictionary<string, object> data = new Dictionary<string, object>();
/*
float px = sfsdata.GetFloat ( "position.x" );
float py = sfsdata.GetFloat ( "position.y" );
float pz = sfsdata.GetFloat ( "position.z" );
float rx = sfsdata.GetFloat ( "rotation.x" );
float ry = sfsdata.GetFloat ( "rotation.y" );
float rz = sfsdata.GetFloat ( "rotation.z" );
float rw = sfsdata.GetFloat ( "rotation.w" );
Dictionary<string, float> data = new Dictionary<string, float> ();
data.Add ( "position.x", px );
data.Add ( "position.y", py );
data.Add ( "position.z", pz );
data.Add ( "rotation.x", rx );
data.Add ( "rotation.y", ry );
data.Add ( "rotation.z", rz );
data.Add ( "rotation.w", rw );
data.Add("health", sfsdata.GetFloat("health"));
data.Add("cooldown", sfsdata.GetFloat("cooldown"));
data.Add("damage", sfsdata.GetFloat("damage"));
data.Add("range", sfsdata.GetFloat("range"));
*/
data.Add("ship", sfsdata.GetUtfString("ship"));
data.Add("weapon", sfsdata.GetUtfString("weapon"));
data.Add("clipsize", sfsdata.GetInt("clipsize"));
data.Add("ammo", sfsdata.GetInt("ammo"));
data.Add("cooldown", sfsdata.GetFloat("cooldown"));
data.Add("range", sfsdata.GetFloat("range"));
data.Add("health", sfsdata.GetFloat("health"));
data.Add("velocity", sfsdata.GetFloat("velocity"));
data.Add("energy", sfsdata.GetFloat("energy"));
GameManager.gameManager.prespawnData = data;
//OnEvent ( "spawn", data );
}
}
示例15: ScoresResponse
private void ScoresResponse(SFSObject sfsdata)
{
Dictionary<string, long> scores = new Dictionary<string, long>();
Dictionary<string, string> names = new Dictionary<string, string>();
long myscore = sfsdata.GetLong("my.score");
int size = sfsdata.GetInt("size");
for (int i = 0; i < size; ++i) {
scores.Add("score" + i.ToString(), sfsdata.GetLong("score" + i.ToString()));
names.Add("player" + i.ToString(), sfsdata.GetUtfString("player" + i.ToString()));
}
Dictionary<string, object> package = new Dictionary<string,object>();
package.Add("scores", scores);
package.Add("names", names);
package.Add("my.score", myscore);
OnEvent("scores", package);
}