本文整理汇总了C#中SFSObject.GetSFSObject方法的典型用法代码示例。如果您正苦于以下问题:C# SFSObject.GetSFSObject方法的具体用法?C# SFSObject.GetSFSObject怎么用?C# SFSObject.GetSFSObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SFSObject
的用法示例。
在下文中一共展示了SFSObject.GetSFSObject方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: fromSFSObject
public void fromSFSObject(SFSObject datos)
{
ISFSObject objeto = datos.GetSFSObject("usuario");
if(objeto != null){
Debug.Log("PERTENEZCO A ESTA SALA");
this.nick=objeto.GetUtfString("nick");
Debug.Log(this.nick);
this.id_proyecto=objeto.GetLong("id_proyecto");
Debug.Log(this.id_proyecto);
this.rol=objeto.GetUtfString("rol");
Debug.Log(this.rol);
} else{
Debug.Log("ME ECHARON A PATADAS PORQUE NO SOY SCRUM MASTER");
DoorLogManager.getInstance().insertarDoorLog(LobbyGUI.user, "VScampusp1", "Campus");
doorManager.doorBack="VScampusp1";
NetworkManager.Instance.changeToState("Campus");
}
}
示例2: loadFromSFSObject
public void loadFromSFSObject(SFSObject aSFSObject) {
if(aSFSObject.GetSFSObject("horses")!=null)
{
aSFSObject = aSFSObject.GetSFSObject("horses") as SFSObject;
}
this.accelerationBase = aSFSObject.GetLong("Acceleration");
this.baseLayer = aSFSObject.GetInt("BaseLayer");
this.blanket = aSFSObject.GetInt("Blanket");
this.cadence = aSFSObject.GetLong("Cadence");
this.determination = aSFSObject.GetLong("Determination");
this.fatigue = aSFSObject.GetInt("Fatigue");
this.salePrice = aSFSObject.GetInt("ForSale");
this.happiness = aSFSObject.GetInt("Happiness");
this.headwear = aSFSObject.GetInt("Headwear");
Debug.LogError("TODO: Make this load health data");
// this.HealthDataFromString(aSFSObject.GetUtfString("HealthData"));
this.height = aSFSObject.GetInt("Height");
Debug.LogError("TODO: Make this load horse record data");
//this.horseRecordFromString(aSFSObject.GetUtfString("HorseRecord"));
this.horseScore = aSFSObject.GetInt("HorseScore");
this.hunger = aSFSObject.GetInt("Hunger");
this.horseID = aSFSObject.GetInt("ID");
this.jumping = aSFSObject.GetLong("Jumping");
this.lastUpdated = aSFSObject.GetInt("LastUpdate");
this.legWear = aSFSObject.GetInt("LegWear1");
this.legWear2 = aSFSObject.GetInt("LegWear2");
this.level = aSFSObject.GetInt("Level");
this.mane = aSFSObject.GetInt("Mane");
try {
this.maxMPH = (float) aSFSObject.GetDouble("MaxSpeed");
} catch(Exception e) {
try {
this.maxMPH = aSFSObject.GetFloat("MaxSpeed");
} catch(Exception e2) {
this.maxMPH = 0.0f;
}
}
string nameStr = aSFSObject.GetUtfString("Name");
this._baseName = nameStr;
try {
if(aSFSObject.GetDouble("OriginalOwner")>0)
this.originalOwnerID = (long) aSFSObject.GetDouble("OriginalOwner");
} catch(Exception e) {
if(aSFSObject.GetLong("OriginalOwner")>0)
this.originalOwnerID = aSFSObject.GetLong("OriginalOwner");
}
if(aSFSObject.GetInt("OwnerID")>0)
this.ownerID = (long) aSFSObject.GetInt("OwnerID");
//this.setPassportFromString(aSFSObject.GetUtfString("PassportString"));
this.overlay = aSFSObject.GetInt("PatternLayer1");
this.potential = aSFSObject.GetInt("Potential");
this.birthTime = aSFSObject.GetInt("PregnantReturnTime");
this.recovery = aSFSObject.GetLong("Recovery");
this.reintype = aSFSObject.GetInt("ReinType");
this.trainingReturnTime = aSFSObject.GetInt("ReturnFromTrainingTime");
this.saddle = aSFSObject.GetInt("SaddleType");
this.gender= (EGender) aSFSObject.GetInt("Sex");
this.speed = aSFSObject.GetLong("Speed");
this._stamina = aSFSObject.GetLong("Stamina");
this.stridelength = aSFSObject.GetLong("StrideLength");
this.surfacePreference = (ESurfaceType) aSFSObject.GetInt("SurfacePreference");
this.tail = aSFSObject.GetInt("Tail");
if(tail>0&&tail<12300) {
tail = 12300;
}
if(mane>0&&mane<12200) {
mane = 12200;
}
this.horseTalents.talents = (aSFSObject.GetUtfString("Talents"));
this.dateborn = aSFSObject.GetInt("TimeCreated");
Debug.LogError("TODO: Make this load trophies owned");
//this.trophiesOwned(aSFSObject.GetUtfString("Trophies"));
this.xp = aSFSObject.GetLong("XP");
this.studFee = (long) aSFSObject.GetInt("StudFee");
this.personalityBigRacer = aSFSObject.GetInt("PersonalityBigRacer");
this.personalityProfessional = aSFSObject.GetInt("PersonalityProfessional");
this.personalityAdaptable = aSFSObject.GetInt("PersonalityAdaptable");
this.personalityJumper = aSFSObject.GetInt("PersonalityA");
this.personalityChaser = aSFSObject.GetInt("PersonalityB");
this.motherID = aSFSObject.GetInt("Mother");
this.fatherID = aSFSObject.GetInt("Father");
}
示例3: SendLaunchMessage
//send out a launch message to all other players that you are moving somewhere
public void SendLaunchMessage(LaunchPacket launchMessage)
{
Debug.Log("Sending Launch Message");
ISFSObject data = new SFSObject();
data.GetSFSObject("launchMessage");
data = launchMessage.ToSFSObject(data);
smartFox.Send(new ObjectMessageRequest(data));
}
示例4: 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;
}
}