本文整理汇总了C#中ISFSObject类的典型用法代码示例。如果您正苦于以下问题:C# ISFSObject类的具体用法?C# ISFSObject怎么用?C# ISFSObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISFSObject类属于命名空间,在下文中一共展示了ISFSObject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ServerRequest
public ServerRequest(Type type, string commandId, ISFSObject requestData, GameObject handler, string callback) {
this.type = type;
this.commandId = commandId;
this.requestData = requestData;
this.handler = handler;
this.callback = callback;
}
开发者ID:markofevil3,项目名称:SlotMachine,代码行数:7,代码来源:ServerRequest.cs
示例2: GameStateChange
/// <summary>
/// Изменилось состояние игры
/// </summary>
/// <param name="data"></param>
void GameStateChange(ISFSObject data)
{
GameStates gameState = (GameStates)Enum.Parse(typeof(GameStates), data.GetUtfString("gameState"));
int time = data.GetInt("time");
if (OnGameStateUpdate != null)
OnGameStateUpdate(gameState, time);
}
开发者ID:PanCrucian,项目名称:IOL,代码行数:11,代码来源:ServerResponses.cs
示例3: FromSFSObject
public static NetworkTransform FromSFSObject(ISFSObject data)
{
NetworkTransform trans = new NetworkTransform();
ISFSObject transformData = data.GetSFSObject("transform");
float x = Convert.ToSingle(transformData.GetDouble("x"));
float y = Convert.ToSingle(transformData.GetDouble("y"));
float z = Convert.ToSingle(transformData.GetDouble("z"));
float rx = Convert.ToSingle(transformData.GetDouble("rx"));
float ry = Convert.ToSingle(transformData.GetDouble("ry"));
float rz = Convert.ToSingle(transformData.GetDouble("rz"));
trans.position = new Vector3(x, y, z);
trans.angleRotation = new Vector3(rx, ry, rz);
if (transformData.ContainsKey("t")) {
trans.TimeStamp = Convert.ToDouble(transformData.GetLong("t"));
}
else {
trans.TimeStamp = 0;
}
return trans;
}
开发者ID:Chongcharen,项目名称:MadnessFotball,代码行数:25,代码来源:NetworkTransform.cs
示例4: OnExtensionResponse
/// <summary>
/// Пришел ответ от расширения сервера
/// </summary>
/// <param name="cmd"></param>
/// <param name="data"></param>
void OnExtensionResponse(string cmd, ISFSObject data)
{
Responses response = (Responses) Enum.Parse(typeof(Responses), cmd);
switch (response)
{
case Responses.GameStateChange:
GameStateChange(data);
break;
case Responses.CurrentTime:
CurrentTimeUpdate(data);
break;
case Responses.PlayersInfo:
if (OnPlayersInfo != null)
OnPlayersInfo(data);
break;
case Responses.Smile:
Smile(data);
break;
case Responses.CirclesInfo:
if (OnCirclesInfo != null)
OnCirclesInfo(data);
break;
case Responses.CircleAndPlayer:
if (OnCircleAndPlayer != null)
OnCircleAndPlayer(data);
break;
}
}
开发者ID:PanCrucian,项目名称:IOL,代码行数:34,代码来源:ServerResponses.cs
示例5: fromSFSObject
public void fromSFSObject(ISFSObject estimacion)
{
user = estimacion.GetUtfString("user");
valorEstimacion = estimacion.GetFloat("valorEstimacion");
descripcion = estimacion.GetUtfString("descripcion");
id_UserStory = estimacion.GetLong("id_Story");
}
开发者ID:CristianCosta,项目名称:Kinect,代码行数:7,代码来源:Estimacion.cs
示例6: HandleSync
public override void HandleSync(ISFSObject obj)
{
if(obj.ContainsKey("gate_state")){
int newState = obj.GetInt("gate_state");
open = (newState == 0) ? true : false;
}
}
开发者ID:claw2013hku,项目名称:UnityTestProject,代码行数:7,代码来源:NetSyncObjGate.cs
示例7: UpdatePlayerInfo
public void UpdatePlayerInfo(ISFSObject data, Color myColor)
{
String colorName = "";
long time = data.GetLong("time");
int s,m,h;
string formattedTime;
if(myColor == Color.red)
colorName = "red";
if(myColor == Color.green)
colorName = "green";
if(myColor == Color.cyan)
colorName = "cyan";
if(myColor == Color.magenta)
colorName = "magenta";
if(myColor == Color.yellow)
colorName = "yellow";
int newtime = (int) time/1000;
s = (int) newtime%60;
m = (int) (newtime/60)%60;
h = (int) (newtime/3600)%24;
formattedTime = string.Format("{0:00}:{1:00}:{2:00}",h,m,s);
GameObject stats = GameObject.Find("StatLabels");
stats.transform.FindChild("Name").GetComponent<UILabel>().text = data.GetUtfString("name");
stats.transform.FindChild("Color").GetComponent<UILabel>().text = colorName;
stats.transform.FindChild("Color").GetComponent<UILabel>().color = myColor;
stats.transform.FindChild("Money").GetComponent<UILabel>().text = data.GetInt("money").ToString();
stats.transform.FindChild("Timer").GetComponent<UILabel>().text = formattedTime;
}
开发者ID:Hargalaten,项目名称:meGAMEss,代码行数:31,代码来源:TextManager.cs
示例8: listAllUsers
public void listAllUsers(ISFSObject dataObject)
{
ISFSArray datos = dataObject.GetSFSArray("usuarios");
foreach (SFSObject proyectoObject in datos){
allUsers.Add(proyectoObject.GetUtfString("nick"));
}
allUsersFullStrings = allUsers.ToArray();
}
开发者ID:CristianCosta,项目名称:Kinect,代码行数:8,代码来源:dashbordVSConfig.cs
示例9: GetSFSTransform
public static Vector3 GetSFSTransform(ISFSObject data)
{
float x = data.GetFloat("x");
float y = data.GetFloat("y");
float z = data.GetFloat("z");
return new Vector3(x,y,z);
}
开发者ID:Daminvar,项目名称:Scatterblocks,代码行数:8,代码来源:NetworkHelper.cs
示例10: GetSFSRotation
public static Vector3 GetSFSRotation(ISFSObject data)
{
float rx = data.GetFloat("rx");
float ry = data.GetFloat("ry");
float rz = data.GetFloat("rz");
return new Vector3(rx, ry, rz);
}
开发者ID:Daminvar,项目名称:Scatterblocks,代码行数:8,代码来源:NetworkHelper.cs
示例11: HandleResponse
public void HandleResponse(ISFSObject anObjectIn, GameWorldManager ourGWM)
{
if(anObjectIn.GetBool("Gathered"))
{
ourGWM.destroyObject(ourGWM.getResourceDictionary()[anObjectIn.GetInt("ID")]);
ourGWM.getResourceDictionary().Remove(anObjectIn.GetInt("ID"));
}
}
开发者ID:Gabe-Biele,项目名称:Project-Circleage,代码行数:8,代码来源:GatherResourceHandler.cs
示例12: HandleNetObjInit
public void HandleNetObjInit(ISFSObject data)
{
Debug.Log ("Handling obj init");
int id = data.GetInt("id");
NetSyncObj recipient = PlayerSpawner.Instance.GetRecipient(id);
if(recipient != null){
recipient.HandleInit(data);
}
}
开发者ID:claw2013hku,项目名称:UnityTestProject,代码行数:9,代码来源:SFSNetworkManager.cs
示例13: HandleNetObjSync
public void HandleNetObjSync(ISFSObject data)
{
// Debug.Log ("Handling obj sync");
int id = data.GetInt("id");
NetSyncObj recipient = PlayerSpawner.Instance.GetRecipient(id);
if(recipient != null){
recipient.HandleSync(data);
}
// Debug.Log ("Handle obj sync, id: " + id);
}
开发者ID:claw2013hku,项目名称:UnityTestProject,代码行数:10,代码来源:SFSNetworkManager.cs
示例14: eseguiAnimazioniRemoteT
//esegue animazioni remote Tastiera
public void eseguiAnimazioniRemoteT(ISFSObject sfsObjIn)
{
anim.SetFloat("Forward",sfsObjIn.GetFloat("f"));
anim.SetFloat("Turn", sfsObjIn.GetFloat("t"));
anim.SetBool("OnGround", sfsObjIn.GetBool("o"));
anim.SetFloat("Jump", sfsObjIn.GetFloat("j"));
anim.SetFloat("JumpLeg", sfsObjIn.GetFloat("jL"));
anim.SetBool("Attacco1", sfsObjIn.GetBool("a1"));
anim.SetBool("Attacco2", sfsObjIn.GetBool("a2"));
}
开发者ID:LucaGames,项目名称:ClassPrjUnit4-5,代码行数:11,代码来源:AnimSyncronizeRiceiver.cs
示例15: listAllProject
public void listAllProject(ISFSObject dataObject)
{
ISFSArray datos = dataObject.GetSFSArray("proyectos");
foreach (SFSObject proyectoObject in datos){
projects.Add(proyectoObject.GetUtfString("sala"));
projectsFull.Add(proyectoObject.GetUtfString("nombre"));
}
projectNameStrings = projects.ToArray();
projectFullStrings = projectsFull.ToArray();
}
开发者ID:CristianCosta,项目名称:Kinect,代码行数:10,代码来源:dashbordVSConfig.cs
示例16: ReceiveMoveDirection
public void ReceiveMoveDirection(ISFSObject obj, bool clearBuffer = false)
{
if(obj.ContainsKey("char_mov")){
if(clearBuffer){
if(moveDirInterpolator != null){
moveDirInterpolator.ClearBuffer();
}
}
ReceiveMoveDirection(CharPosEffComp.MoveDirFromSFSObject(obj));
}
}
开发者ID:claw2013hku,项目名称:UnityTestProject,代码行数:11,代码来源:CharPosRecp.cs
示例17: PutFloat
public void PutFloat(ISFSObject data, string key, float item)
{
if (sendEncrypted)
{
data.PutByteArray(key, provider.EncryptFloat(item));
}
else
{
data.PutFloat(key, item);
}
}
开发者ID:Antaresgames,项目名称:AegisBorn,代码行数:11,代码来源:SendableObject.cs
示例18: PutDouble
public void PutDouble(ISFSObject data, string key, double item)
{
if (sendEncrypted)
{
data.PutByteArray(key, provider.EncryptDouble(item));
}
else
{
data.PutDouble(key, item);
}
}
开发者ID:Antaresgames,项目名称:AegisBorn,代码行数:11,代码来源:SendableObject.cs
示例19: PutBool
public void PutBool(ISFSObject data, string key, bool item)
{
if (sendEncrypted)
{
data.PutByteArray(key, provider.EncryptBool(item));
}
else
{
data.PutBool(key, item);
}
}
开发者ID:Antaresgames,项目名称:AegisBorn,代码行数:11,代码来源:SendableObject.cs
示例20: GetBool
public bool GetBool(ISFSObject data, string key)
{
if (receiveEncrypted)
{
return provider.DecryptBool(data.GetByteArray(key));
}
else
{
return data.GetBool(key);
}
}
开发者ID:Antaresgames,项目名称:AegisBorn,代码行数:11,代码来源:ReceivableObject.cs
注:本文中的ISFSObject类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论