本文整理汇总了C#中SFSObject.GetDouble方法的典型用法代码示例。如果您正苦于以下问题:C# SFSObject.GetDouble方法的具体用法?C# SFSObject.GetDouble怎么用?C# SFSObject.GetDouble使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SFSObject
的用法示例。
在下文中一共展示了SFSObject.GetDouble方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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");
}
示例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");
}