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


C# SFSObject类代码示例

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


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

示例1: getTutorial

 public void getTutorial(string nick, dbCallback getCallback)
 {
     this.getCallback= getCallback;
     SFSObject sfsObject = new SFSObject();
     sfsObject.PutUtfString("nick",nick);
     extensionManager.sendRequest(new ExtensionRequest("consultarTutorial", sfsObject), "getTutorial", getTutorialResponse);
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:7,代码来源:TutorialManagerDB.cs

示例2: SendableObject

 public SendableObject(SmartFox conn, bool encrypt)
 {
     provider = EncryptionProvider.GetInstance();
     sendEncrypted = encrypt;
     connection = conn;
     data = new SFSObject();
 }
开发者ID:Antaresgames,项目名称:AegisBorn,代码行数:7,代码来源:SendableObject.cs

示例3: OnConnection

    void OnConnection(BaseEvent evt)
    {
        bool connectionSuccess = (bool)evt.Params["success"];

        Debug.Log("OnConn:" + connectionSuccess);

        if (connectionSuccess)
        {
            SFSObject loginData = new SFSObject();
            loginData.PutUtfString("username", usernameField.value);
            loginData.PutUtfString("password", passwordField.value);

            sfs.Send(new Sfs2X.Requests.LoginRequest("", "", "MainZone", loginData));

            connectionWindow.SetActive(false);
            loggingWindow.SetActive(true);
        }
        else
        {
            sfs = Connection.Instance().Reset();
            SetupListeners();

            loginWindow.SetActive(true);
            connectionWindow.SetActive(false);
        }
    }
开发者ID:lukebitts,项目名称:AcidProject,代码行数:26,代码来源:Login.cs

示例4: insertarTutorial

 public void insertarTutorial(string nick, string tutorial)
 {
     SFSObject sfsObject = new SFSObject();
     sfsObject.PutUtfString("nick",nick);
     sfsObject.PutUtfString("tutorial",tutorial);
     extensionManager.sendRequest(new ExtensionRequest("insertarTutorial", sfsObject));
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:7,代码来源:TutorialManagerDB.cs

示例5: getHighScores

 public ArrayList getHighScores(string juego)
 {
     SFSObject sfsObject = new SFSObject();
     sfsObject.PutUtfString("tabla",juego);
     extensionManager.sendRequest(new ExtensionRequest("consultarHighScores", sfsObject), "getHighScores", getHighScoresResponse);
     return this.ultimaConsultaHighScores;
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:7,代码来源:GameLogManager.cs

示例6: CreatePublicMessageObject

 private ISFSObject CreatePublicMessageObject(JSONObject jsonData, string commandId) {
   ISFSObject objOut = new SFSObject();
   objOut.PutByteArray("jsonData", Utils.ToByteArray(jsonData.ToString()));
   objOut.PutUtfString("message", jsonData.GetString("message"));
   objOut.PutUtfString("cmd", commandId);
   return objOut;
 }
开发者ID:markofevil3,项目名称:SlotMachine,代码行数:7,代码来源:GameBottomBarScript.cs

示例7: ReceiveHeading

    //This method is called when receiving remote heading
    // We update course here
    public void ReceiveHeading(SFSObject data)
    {
        if (receiveMode)
        {
            Vector3 pos = new Vector3(Convert.ToSingle(data.GetNumber("x")),
                                        Convert.ToSingle(data.GetNumber("y")),
                                        Convert.ToSingle(data.GetNumber("z"))
                                        );
            float angle = Convert.ToSingle(data.GetNumber("a"));
            long time = (long) data.GetNumber("t");
            float speed = Convert.ToSingle(data.GetNumber("s"));
            long accelerationTime = (long) data.GetNumber("at");
            float endSpeed = -1;
            if (accelerationTime != -1)
            {
                endSpeed = Convert.ToSingle(data.GetNumber("es"));
            }
            //Debug.Log("ReceiveHeading() has received a heading : "+pos+"; a="+angle+", s="+speed+", t="+time+", at="+accelerationTime+", es="+endSpeed);

            course.InitFromValues(pos, angle, time, speed, endSpeed, accelerationTime);
            if(hasReceivedHeading == true)
                CreateInterceptor();

            hasReceivedHeading = true;
        }
    }
开发者ID:ylyking,项目名称:lynea,代码行数:28,代码来源:HeadingReceiver.cs

示例8: Play

 /// <summary>
 /// Начать игру с N количеством игроков
 /// </summary>
 /// <param name="maxUsers"></param>
 void Play(PlayModes playMode)
 {
     ISFSObject data = new SFSObject();
     data.PutUtfString("playMode", Util.EnumToStr(playMode));
     data.PutUtfString("nickName", IOL.Instance.UserNick);
     SendToLastJoinedRoom(Reqeusts.Play, data);
 }
开发者ID:PanCrucian,项目名称:IOL,代码行数:11,代码来源:ServerRequests.cs

示例9: ReceiveTransform

    //This method is called when receiving remote transform
    // We update lastState here to know last received transform state
    void ReceiveTransform(SFSObject data)
    {
        Debug.Log("ReceiveTransform()");
        if (receiveMode) {
            Vector3 pos = new Vector3(Convert.ToSingle(data.GetNumber("x")),
                                        Convert.ToSingle(data.GetNumber("y")),
                                        Convert.ToSingle(data.GetNumber("z"))
                                        );

            Quaternion rot = new Quaternion(
                                        Convert.ToSingle(0.0),
                                        Convert.ToSingle(data.GetNumber("ry")),
                                        Convert.ToSingle(0.0),
                                        Convert.ToSingle(data.GetNumber("w"))
            );

            lastState.InitFromValues(pos, rot);

            // Adding next received state to the queue
            NetworkTransform nextState = new NetworkTransform(this.gameObject);
            nextState.InitFromValues(pos, rot);
            queue.Enqueue(nextState);
            Debug.Log("queue length: "+Convert.ToString(queue.Count));
        }
    }
开发者ID:ylyking,项目名称:lynea,代码行数:27,代码来源:NetworkTransformReceiver.cs

示例10: toSFSObject

 public SFSObject toSFSObject()
 {
     SFSObject asocObject = new SFSObject ();
     asocObject.PutLong ("Id_Test", Id_Test);
     asocObject.PutLong ("Id_Task", Id_Tarea);
     return asocObject;
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:7,代码来源:AsociacionTareaTest.cs

示例11: SendTransform

 void SendTransform()
 {
     if ((timeLastBuffering >= bufferingPeriod)&&((lastAnimation!="idle")||(currentAnimation!="idle"))) {//&&(lastAnimation.Equals("idle"))
             lastState = NetworkTransform.FromTransform(thisTransform);
             SFSObject data=new SFSObject();
             if (!currentAnimation.Equals(lastAnimation))
                 data.PutUtfString("anim",currentAnimation);
             lastState.ToSFSObject(data);
             buffer.AddSFSObject(data);
             timeLastSending += bufferingPeriod;
             packageSize+=1;
             timeLastBuffering = 0.0f;
             lastAnimation=currentAnimation;
             //return;
         } else if (!packageSize.Equals(0)){
             sendBuffer();
             packageSize=0;
         }
         if (packageSize.Equals(packageMaxSize)){
             sendBuffer();
             packageSize=0;
             //timeLastSending = 0.0f;
         }
     timeLastBuffering += Time.deltaTime;
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:25,代码来源:NetworkTransformSender.cs

示例12: getBackNews

 //consulta las noticias segun la categoria y facultad
 public void getBackNews(string category, string faculty)
 {
     SFSObject sfsObject = new SFSObject();
     sfsObject.PutUtfString("categoria",category);
     sfsObject.PutUtfString("facultad",faculty);
     //downloadFinished = false;
     extensionManager.sendRequest(new ExtensionRequest("consultarNews", sfsObject), "getNews", getNewsResponse);
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:9,代码来源:NewsManager.cs

示例13: initPacketFromHost

	private void initPacketFromHost(SFSObject aObject) {
		long id = aObject.GetLong("i");
		for(int i = 0;i<this.sortedHorses.Count;i++) {
			if(sortedHorses[i].horseID==id) {
				sortedHorses[i].initFromPackage(aObject);
			}
		}
	}
开发者ID:dongvanhung,项目名称:HA3D,代码行数:8,代码来源:RaceTrack.cs

示例14: ForceRemotePlayerToSendTransform

 void ForceRemotePlayerToSendTransform(User user)
 {
     SmartFoxClient client = NetworkController.GetClient();
     SFSObject data = new SFSObject();
     data.Put("_cmd", "f");  //We put _cmd = "f" here to know that this object contains "force send transform" demand
     data.Put("to_uid", user.GetId()); // Who this message is for
     client.SendObject(data);
 }
开发者ID:Nivek12,项目名称:Hegira,代码行数:8,代码来源:PlayerSpawnController.cs

示例15: getAvatar

 public void getAvatar(string nick, dbCallback getCallback)
 {
     Debug.Log("Entro al getAvatar---------------!!!");
     this.getCallback= getCallback;
     SFSObject sfsObject = new SFSObject();
     sfsObject.PutUtfString("nick",nick);
     extensionManager.sendRequest(new ExtensionRequest("consultarAvatar", sfsObject), "getAvatar", getAvatarResponse);
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:8,代码来源:CustomizationManager.cs


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