本文整理汇总了C#中ISFSObject.GetDouble方法的典型用法代码示例。如果您正苦于以下问题:C# ISFSObject.GetDouble方法的具体用法?C# ISFSObject.GetDouble怎么用?C# ISFSObject.GetDouble使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISFSObject
的用法示例。
在下文中一共展示了ISFSObject.GetDouble方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetDouble
public double GetDouble(ISFSObject data, string key)
{
if (receiveEncrypted)
{
return provider.DecryptDouble(data.GetByteArray(key));
}
else
{
return data.GetDouble(key);
}
}
示例2: HandleShotFired
// When someon shots handle it and play corresponding animation
private void HandleShotFired(ISFSObject dt)
{
int userId = dt.GetInt ("id");
if (userId != smartFox.MySelf.Id) {
double sx, sy, sz, ex, ey, ez;
sx = dt.GetDouble ("sx");
sy = dt.GetDouble ("sy");
sz = dt.GetDouble ("sz");
ex = dt.GetDouble ("ex");
ey = dt.GetDouble ("ey");
ez = dt.GetDouble ("ez");
Vector3 start = new Vector3 ((float)sx, (float)sy, (float)sz);
Vector3 end = new Vector3 ((float)ex, (float)ey, (float)ez);
string shooterName = smartFox.LastJoinedRoom.GetUserById (userId).Name;
//SoundManager.Instance.PlayShot(PlayerManager.Instance.GetRecipient(userId).audio);
//PlayerManager.Instance.SyncAnimation(userId, "Shot", 1);
Attack.instance.shot (start, end, shooterName);
}
}
示例3: Setup
public void Setup(ISFSObject obj)
{
particleSystem.renderer.sortingLayerName = "2 Middle Lower UI";
this.gwName = obj.GetUtfString("NAME");
this.state = obj.GetUtfString("STATE");
this.owner = obj.GetUtfString("OWNER");
this.atk = obj.GetInt("ATK");
this.def = obj.GetInt("DEF");
this.type = obj.GetUtfString("TYPE");
ISFSArray sws = obj.GetSFSArray("SW");
this.region = obj.GetUtfString("REGION");
this.sw = new string[3];
this.sw[0] = (string) sws.GetElementAt(0);
this.sw[1] = (string) sws.GetElementAt(1);
this.sw[2] = (string) sws.GetElementAt(2);
mg = GameObject.Find("Manager").GetComponent<Manager>();
gameObject.transform.position = new Vector3((float)obj.GetDouble("X")*mg.getScale().x,(float)obj.GetDouble("Y")*mg.getScale().y,1F);
gameObject.transform.localScale = new Vector3(0.25f,0.25f,0.25f);
}