当前位置: 首页>>代码示例>>C#>>正文


C# SFSObject.PutInt方法代码示例

本文整理汇总了C#中SFSObject.PutInt方法的典型用法代码示例。如果您正苦于以下问题:C# SFSObject.PutInt方法的具体用法?C# SFSObject.PutInt怎么用?C# SFSObject.PutInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SFSObject的用法示例。


在下文中一共展示了SFSObject.PutInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: asSFSObject

	public SFSObject asSFSObject(int aRound) {
		SFSObject s = new SFSObject ();
		s.PutInt ("id",this.horseID);
		s.PutUtfString ("c", this.compressedString(aRound));
		s.PutLong ("o", this.ownerID);
		s.PutInt ("u", SmartfoxConnectionHandler.REF.smartfoxuid);
		return s;
	}
开发者ID:dongvanhung,项目名称:HA3D,代码行数:8,代码来源:HorseData.cs

示例2: OnLogin

 void OnLogin(BaseEvent e)
 {
     Debug.Log("Welcome "+ e.Params["user"]);
     ISFSObject objOut = new SFSObject();
     objOut.PutInt("a",sumA);
     objOut.PutInt("b",sumB);
     _sfs.Send(new ExtensionRequest("SUM_INTS",objOut));
     _sfs.Send(new JoinRoomRequest(roomName));
 }
开发者ID:nicolasmbatista,项目名称:UnityTests,代码行数:9,代码来源:SFS2_Connect.cs

示例3: SendHealthChange

 public void SendHealthChange(string ShooterName, int damage)
 {
     SFSObject message = new SFSObject ();
     message.PutUtfString ("shooterName", ShooterName);
     message.PutInt("damage",damage);
     Room room = smartFox.LastJoinedRoom;
     ExtensionRequest request = new ExtensionRequest("updateHealth", message, room);
     smartFox.Send(request);
 }
开发者ID:kimreik,项目名称:Snow,代码行数:9,代码来源:NetworkManager.cs

示例4: SendAnimationState

 /// <summary>
 /// Send local animation state to the server
 /// </summary>
 /// <param name="message">
 /// A <see cref="System.String"/>
 /// </param>
 /// <param name="layer">
 /// A <see cref="System.Int32"/>
 /// </param>
 public void SendAnimationState(string message, int layer)
 {
     Room room = smartFox.LastJoinedRoom;
     ISFSObject data = new SFSObject();
     data.PutUtfString("msg", message);
     data.PutInt("layer", layer);
     ExtensionRequest request = new ExtensionRequest("sendAnim", data, room);
     smartFox.Send(request);
 }
开发者ID:justdude,项目名称:Network-Hunter,代码行数:18,代码来源:NetworkManager.cs

示例5: SendPublicMessageRequestFire

 public void SendPublicMessageRequestFire(int myPlayerID, int shootPower, float directX, float directY)
 {
     SFSObject obj = new SFSObject();
     obj.PutUtfString("username", userName + myPlayerID);
     obj.PutInt("shootpower", shootPower);
     obj.PutFloat("directx", directX);
     obj.PutFloat("directy", directY);
     sfs.Send(new PublicMessageRequest("playerfire", obj));
 }
开发者ID:duylinh2109,项目名称:ProjectIII,代码行数:9,代码来源:SmartFoxInGame.cs

示例6: performAction

        public void performAction(GameObject ourSSO)
        {
            RayCastManager ourRCM = ourSSO.GetComponent<RayCastManager>();
            string astringID = ourRCM.currentRayCastObject.name.Split('_')[2];

            ISFSObject aSFSObject = new SFSObject();
            aSFSObject.PutInt("ID", Convert.ToInt32(astringID));

            SmartFox SFServer = SmartFoxConnection.Connection;
            SFServer.Send(new ExtensionRequest("GatherResource", aSFSObject));
        }
开发者ID:Gabe-Biele,项目名称:Project-Circleage,代码行数:11,代码来源:GatherResourceAction.cs

示例7: performAction

        public void performAction(GameObject ourSSO)
        {
            RayCastManager ourRCM = ourSSO.GetComponent<RayCastManager>();
            string aSettlementID = ourRCM.currentRayCastObject.transform.parent.name.Split('_')[2];

            ISFSObject aSFSObject = new SFSObject();
            aSFSObject.PutInt("ID", Convert.ToInt32(aSettlementID));

            SmartFox SFServer = SmartFoxConnection.Connection;
            SFServer.Send(new ExtensionRequest("CenterNodeInformation", aSFSObject));
        }
开发者ID:Gabe-Biele,项目名称:Project-Circleage,代码行数:11,代码来源:CenterNodeAction.cs

示例8: performAction

        public void performAction(GameObject ourSSO)
        {
            Item usedItem = ourSSO.GetComponent<GameUI>().getCurrentInventoryItem();

            ISFSObject aSFSObject = new SFSObject();
            aSFSObject.PutInt("ID", usedItem.getItemID());
            aSFSObject.PutUtfString("Name", usedItem.getName());
            aSFSObject.PutUtfString("Sublocation", usedItem.getLocation());

            SmartFox SFServer = SmartFoxConnection.Connection;
            SFServer.Send(new ExtensionRequest("UseItem", aSFSObject));
        }
开发者ID:Gabe-Biele,项目名称:Project-Circleage,代码行数:12,代码来源:UseItemAction.cs

示例9: 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);
 }
开发者ID:claw2013hku,项目名称:UnityTestProject,代码行数:13,代码来源:ActorStatusSend.cs

示例10: updateXPData

	public void updateXPData() {
		SFSArray sfsArray = new SFSArray();
		SFSObject r = new SFSObject();
		r.PutDouble("Sp",this.speed);
		r.PutDouble("Ac",this.accelerationBase);
		r.PutDouble("Ju",this.jumping);
		r.PutDouble("St",this._stamina);
		r.PutDouble("Re",this.recovery);
		r.PutDouble("Sl",this.stridelength);
		r.PutDouble("Ca",this.cadence);
		r.PutDouble("De",this.determination);
		r.PutDouble("XP",this.xp);
		r.PutInt("L",this.level);
		r.PutInt("RT",this.trainingReturnTime);
		r.PutInt("H",this.hunger);
		r.PutInt("F",this.fatigue);
		r.PutDouble("Ha",this.happiness); // Now double instead of int
		r.PutDouble("Ho",this.horseScore); // Now double instead of int
		r.PutDouble("Ma",this.maxMPH);
		r.PutInt("ID",this.horseID);
		sfsArray.AddSFSObject(r);
		SmartfoxConnectionHandler.REF.sendHorsesArray("h_xp",sfsArray);
	}
开发者ID:dongvanhung,项目名称:HA3D,代码行数:23,代码来源:HorseDataWithSmartfoxUpdater.cs

示例11: SendData

    public void SendData(Transform a)
    {
        ISFSObject isfsO = new SFSObject();
        isfsO.PutInt("Sender", sfs.MySelf.PlayerId);

        isfsO.PutFloat("px", a.position.x);
        isfsO.PutFloat("py", a.position.y);
        isfsO.PutFloat("pz", a.position.z);

        isfsO.PutFloat("rx", a.rotation.x);
        isfsO.PutFloat("ry", a.rotation.y);
        isfsO.PutFloat("rz", a.rotation.z);

        sfs.Send(new ExtensionRequest(ConfigRequestCmd.cmd_playermove, isfsO, sfs.LastJoinedRoom));
    }
开发者ID:fmo080308,项目名称:TinyTroop,代码行数:15,代码来源:SmartFoxInGame.cs

示例12: SendMovementDirection

 void SendMovementDirection()
 {
     if (lastMoveState.IsDifferent(component, accuracy)) {
         if (timeLastSendingMove >= sendingPeriod) {
             lastMoveState = CharPosEffComp.NetworkMoveDirection.FromComponent(component);
             ISFSObject data = new SFSObject();
             CharPosEffComp.ToSFSObject(lastMoveState, data);
             data.PutInt("id", syncObj.ID);
             SFSNetworkManager.Instance.SendNetObjSync(data);
             timeLastSendingMove = 0;
             return;
         }
     }
     timeLastSendingMove += Time.deltaTime;
 }
开发者ID:claw2013hku,项目名称:UnityTestProject,代码行数:15,代码来源:CharPosSend.cs

示例13: broadcastPositions

	public void broadcastPositions() {
		if(Time.time-lastBroadcastTime>MIN_TIME_BETWEEN_BROADCAST) {
			
			SFSObject o = new SFSObject();
			SFSArray h = new SFSArray();
			for(int i = 0;i<this.sortedHorses.Count;i++) {
				if(sortedHorses[i].currentPoint==null) 
					return;
				h.AddSFSObject(sortedHorses[i].dataPackage);
			}
			o.PutSFSArray("a",h);
			o.PutInt("f",this.framesPassed);
			SmartfoxConnectionHandler.REF.sendRaceMessage("b",o);
			lastBroadcastTime = Time.time;
		}
	}
开发者ID:dongvanhung,项目名称:HA3D,代码行数:16,代码来源:RaceTrack.cs

示例14: SendResultant

 void SendResultant()
 {
     //if (lastResultState.IsDifferent(component, accuracy)) {
         if (timeLastSendingPos >= sendingPeriod) {
             lastResultState = CharPosEffComp.NetworkResultant.FromComponent(component);
             ISFSObject data = new SFSObject();
             CharPosEffComp.ToSFSObject(lastResultState, data);
             data.PutInt("id", syncObj.ID);
             SFSNetworkManager.Instance.SendNetObjSync(data);
             timeLastSendingPos = 0;
             //Debug.Log("sending pos msg, id: " + syncObj.ID);
             return;
         }
     //}
     timeLastSendingPos += Time.deltaTime;
 }
开发者ID:claw2013hku,项目名称:UnityTestProject,代码行数:16,代码来源:CharPosSend.cs

示例15: Cancel

    public void Cancel()
    {
        UserVariable uv = new SFSUserVariable("Ready", "NO");
        List<UserVariable> lUV = new List<UserVariable>();
        lUV.Add(uv);
        sfs.Send(new SetUserVariablesRequest(lUV));

        RoomVariable rv = new SFSRoomVariable("ReadyCount", int.Parse(sfs.LastJoinedRoom.GetVariable("ReadyCount").Value.ToString()) - 1);
        List<RoomVariable> lRV = new List<RoomVariable>();
        lRV.Add(rv);
        sfs.Send(new SetRoomVariablesRequest(lRV));

        ISFSObject isfsO = new SFSObject();
        isfsO.PutInt("Sender", sfs.MySelf.PlayerId);
        sfs.Send(new PublicMessageRequest("PlayerCancel", isfsO, sfs.LastJoinedRoom));
    }
开发者ID:duylinh2109,项目名称:ProjectIII,代码行数:16,代码来源:SmartFoxLobby.cs


注:本文中的SFSObject.PutInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。