本文整理汇总了C#中SFSObject.ContainsKey方法的典型用法代码示例。如果您正苦于以下问题:C# SFSObject.ContainsKey方法的具体用法?C# SFSObject.ContainsKey怎么用?C# SFSObject.ContainsKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SFSObject
的用法示例。
在下文中一共展示了SFSObject.ContainsKey方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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");
}
}
示例2: handleRacePositionsBroadcast
public void handleRacePositionsBroadcast(SFSObject aObject) {
if(aObject.ContainsKey("a")) {
SFSArray a = (SFSArray) aObject.GetSFSArray("a");
int f = aObject.GetInt("f");
for(int i = 0;i<a.Size();i++) {
initPacketFromHost((SFSObject) a.GetSFSObject(i));
}
//Time.timeScale = 0.01f;
for(int i = f;i<framesPassed;i++) {
for(int j = 0;j<this.sortedHorses.Count;j++) {
sortedHorses[j].FixedUpdate();
}
}
for(int i = 0;i<sortedHorses.Count;i++) {
Vector3 posDiff = sortedHorses[i].transform.position-sortedHorses[i].originalPosition;
// Debug.Log ("Position was wrong by: "+posDiff+" last applied speed was: "+sortedHorses[i].lastAppliedSpeed);
}
}
}
示例3: onHorseVariablesChanged
public void onHorseVariablesChanged(SFSObject aObject) {
if (aObject.ContainsKey ("h" + this.horseIndex)) {
SFSObject thisHorseObject = (SFSObject) aObject.GetSFSObject ("h" + this.horseIndex);
dataFromServer (thisHorseObject.GetInt ("u"), thisHorseObject.GetUtfString ("c"));
} else {
ownerID = 0;
}
}