本文整理汇总了C#中SFSObject.PutSFSObject方法的典型用法代码示例。如果您正苦于以下问题:C# SFSObject.PutSFSObject方法的具体用法?C# SFSObject.PutSFSObject怎么用?C# SFSObject.PutSFSObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SFSObject
的用法示例。
在下文中一共展示了SFSObject.PutSFSObject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendStatusChange
void SendStatusChange()
{
pendingSend = false;
ISFSObject data = new SFSObject();
ISFSObject tr = new SFSObject();
if(sendHP){
Debug.Log("Sending status change: " + component.HP);
tr.PutFloat("currentHP", component.HP);
}
data.PutSFSObject(NetSyncObjCharacter.statusDS, tr);
data.PutInt("id", syncObj.ID);
SFSNetworkManager.Instance.SendNetObjSync(data);
}
示例2: createAndDeclareNPCHorses
private void createAndDeclareNPCHorses() {
if(this.iAmHost) {
HorseController myHorse = null;
for(int i = 0;i<sortedHorses.Count;i++) {
if(sortedHorses[i].ownerID==PlayerMain.LOCAL.playerID) {
myHorse = sortedHorses[i];
}
}
SFSObject o = new SFSObject();
for(int i = 0;i<sortedHorses.Count;i++) {
sortedHorses[i].makeNPC(myHorse);
o.PutSFSObject("h"+i,sortedHorses[i].asSFSObject);
}
SmartfoxConnectionHandler.REF.sendRaceMessage("dn",o);
}
}
示例3: SendTriggerEnter
public void SendTriggerEnter(int colliderId, int targetId)
{
Room room = smartFox.LastJoinedRoom;
ISFSObject data = new SFSObject();
ISFSObject tr = new SFSObject();
tr.PutInt("colliderId", colliderId);
tr.PutInt("targetId", targetId);
tr.PutLong("t", Convert.ToInt64(0));
data.PutSFSObject("collide_info", tr);
ExtensionRequest request = new ExtensionRequest("sendTriggerEnter", data, room);
smartFox.Send(request);
}