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