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


C# ISFSObject.GetSFSArray方法代码示例

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


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

示例1: 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

示例2: 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

示例3: listUserXProject

 public void listUserXProject(ISFSObject dataObject)
 {
     ISFSArray datos = dataObject.GetSFSArray("usuarios");
             users.Clear();
             usersFull.Clear();
             foreach (SFSObject proyectoObject in datos){
                 users.Add(proyectoObject.GetUtfString("nick"));
                 usersFull.Add(proyectoObject.GetUtfString("rol"));
             }
             usersNameStrings =users.ToArray();
             usersFullStrings = usersFull.ToArray();
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:12,代码来源:dashbordVSConfig.cs

示例4: OnResponseGetAssetsInfo

    private void OnResponseGetAssetsInfo(ISFSObject a_infoData)
    {
        //assetsinfo
        if(a_infoData.GetBool(Keys.SUCCESS))
        {
            ISFSArray l_tempSfsArray = a_infoData.GetSFSArray(Keys.ASSETS_INFO);
            List<AssetsInfo> l_allCurrentInfoList = new List<AssetsInfo>();
            for (int indexAssetInfo = 0; indexAssetInfo < l_tempSfsArray.Count; indexAssetInfo++)
            {
                AssetsInfo l_temp = new AssetsInfo();
                l_temp.AssetID = (int)(l_tempSfsArray.GetSFSObject(indexAssetInfo)).GetLong("assetsid");
                l_temp.ImageTargetID = (l_tempSfsArray.GetSFSObject(indexAssetInfo)).GetUtfString("imagetargetid");
                l_temp.URL = (l_tempSfsArray.GetSFSObject(indexAssetInfo)).GetUtfString("assetsurl");
                l_temp.AssetName = (l_tempSfsArray.GetSFSObject(indexAssetInfo)).GetUtfString("assetname");
                l_allCurrentInfoList.Add(l_temp);

            }
            GameBaseEvent l_assetsInfoEvent = new GameBaseEvent(eGameEvents.getAssetsInfo.ToString());
            GameEventArgs l_eventArg = new GameEventArgs();
            l_eventArg.EventData  = (object)l_allCurrentInfoList;
            l_assetsInfoEvent.Args = l_eventArg;
            dispatchEvent(this, l_assetsInfoEvent);
        }
        else
        {
            Debug.Log(a_infoData.GetUtfString(Keys.ERROR));
        }
    }
开发者ID:SillyGames,项目名称:T_r_e_a_s_u_r_e_H_u_n_t,代码行数:28,代码来源:NetworkManager.cs

示例5: syncBlocks

 private void syncBlocks(ISFSObject msg)
 {
     var networkBlocks = msg.GetSFSArray("blocks");
     for(int i = 0; i < networkBlocks.Size (); i++) {
         Debug.Log(_blocks[i].name);
         float[] coordinates = networkBlocks.GetSFSObject(i).GetFloatArray("position");
         float[] velocityComponents = networkBlocks.GetSFSObject(i).GetFloatArray("velocity");
         _blocks[i].transform.position = new Vector3(coordinates[0], _blocks[i].transform.position.y, coordinates[1]);
         _blocks[i].rigidbody.velocity = new Vector3(velocityComponents[0], 0, velocityComponents[1]);
     }
 }
开发者ID:Daminvar,项目名称:Scatterblocks,代码行数:11,代码来源:GameManager.cs

示例6: SetupInventory

 private void SetupInventory(ISFSObject data)
 {
     gameObject.GetComponent<InventoryManager>().UpdatePlayerInventory(data.GetSFSArray("inventory"));
 }
开发者ID:Hargalaten,项目名称:meGAMEss,代码行数:4,代码来源:NetworkManager.cs

示例7: tracePath

    private void tracePath(ISFSObject data)
    {
        if(lost)
        {
            mg.getNotificationManager().DisplayWindow("ACTIONSDISABLED");
            return;
        }

        ISFSArray path = data.GetSFSArray("hackingPath");
        int i = 0;

        while(i < path.Size()-1)
        {
            String startC = (String) path.GetElementAt(i);
            String targetC =(String) path.GetElementAt(i+1);

            String[] coord_1 = startC.Split(':');
            String[] coord_2 = targetC.Split(':');

            Vector3 p0 = new Vector3(float.Parse(coord_1[0]), float.Parse(coord_1[1]), 1F);
            Vector3 p1 = new Vector3(float.Parse(coord_2[0]), float.Parse(coord_2[1]), 1F);

            float inclinazioneRay = Mathf.Atan((p1.y-p0.y)/(p1.x-p0.x))*Mathf.Rad2Deg;
            rotation.eulerAngles = new Vector3(0,0,inclinazioneRay);

            float distance = Vector3.Distance(p1,p0);
            rayLenght = distance;
            Vector3 d0 = new Vector3(-5.8f, 2.2f, 1f);
            Vector3 d1 = new Vector3(5.3f, 2.5f, 1f);
            if(!((p0 == d0 && p1 == d1)|| (p1 == d0 && p0 == d1)))
            {
                ray = Instantiate(rayPrefab) as GameObject;
                ray.transform.parent = GameObject.Find("UI").transform;
                ray.transform.localPosition = new Vector3((p1.x+p0.x)/2,(p1.y+p0.y)/2, 5F);
                ray.transform.localScale = new Vector2(rayLenght, 0.7F);
                ray.transform.rotation=rotation;
            }
            else
            {
                ray = Instantiate(rayPrefab) as GameObject;
                ray.transform.parent = GameObject.Find("UI").transform;
                ray.transform.localPosition = new Vector3(6.03F, 2.5F, 5F);
                ray.transform.localScale = new Vector2(1.18F, 0.7F);
                ray.transform.rotation=rotation;

                ray = Instantiate(rayPrefab) as GameObject;
                ray.transform.parent = GameObject.Find("UI").transform;
                ray.transform.localPosition = new Vector3(-6.25F, 2.18F, 5F);
                ray.transform.localScale = new Vector2(0.8F, 0.7F);
                ray.transform.rotation=rotation;
            }

            i++;
        }
    }
开发者ID:Hargalaten,项目名称:meGAMEss,代码行数:55,代码来源:NetworkManager.cs

示例8: DisplayEndingStats

    private void DisplayEndingStats(ISFSObject data)
    {
        GameObject.Find("BlackPanel").GetComponent<SpriteRenderer>().enabled = true;
        GameObject.Find("EndGameCamera").GetComponent<Camera>().enabled = true;
        gameEnded = true;
        Debug.Log("recieved endgame");
        string text = "";
        for(int i = 0; i < data.Size(); i++){
            ISFSArray p = data.GetSFSArray("player"+i);

            p.GetBool(3);//won
            string victory = p.GetBool(3)?"VICTORY":"DEFEAT";
            text += p.GetUtfString(0)+": "+victory+"\nConquered Gateway: "+p.GetInt(1)+"\nEarned Money: "+p.GetInt(2)+"\n\n";
        }

        GameObject.Find("endStats").GetComponent<UILabel>().text = text;
    }
开发者ID:Hargalaten,项目名称:meGAMEss,代码行数:17,代码来源:NetworkManager.cs

示例9: InstallItem

    private void InstallItem(ISFSObject data)
    {
        if(data.GetBool("success"))
            mg.getNotificationManager().DisplayWindow("INSTALLED");

        gameObject.GetComponent<InventoryManager>().UpdatePlayerInventory(data.GetSFSArray("inventory"));

        ISFSObject data2 = new SFSObject();
        Gateway gtw = gameObject.GetComponent<TextManager>().gtw;
        data2.PutUtfString("selctedGateway", gtw.getState());
        smartFox.Send(new  ExtensionRequest("refreshGtw", data2, smartFox.LastJoinedRoom));
    }
开发者ID:Hargalaten,项目名称:meGAMEss,代码行数:12,代码来源:NetworkManager.cs

示例10: HandleTransform

    // Updating transform of the remote player from server
    private void HandleTransform(ISFSObject dt)
    {
        //Debug.Log("transform!!");
        int userId = dt.GetInt("id");
        //
        if (userId != smartFox.MySelf.Id) {
            // Update transform of the remote user object

            NetworkTransformReceiver recipient = PlayerManager.Instance.GetRecipient(userId);
            if (recipient==null) Debug.Log("me mameeeeee");
            else Debug.Log("me llegan datos de "+userId);
            ISFSArray data = dt.GetSFSArray("transform");
            //NetworkTransform ntransform = NetworkTransform.FromSFSObject(data);
                if (recipient!=null) {
                    //recipient.ReceiveTransform(ntransform);
                    recipient.addObject(data);
                    //System.Threading.Thread.Sleep((int)Time.deltaTime);
                }

            /*ISFSArray buff = dt.GetSFSArray("transformBuffer");
            if (buff == null) Debug.Log("ES NULLLLLLLL - BUFFER");
            Debug.Log("SIZE BUFFER: "+buff.Size());
            int num = 0;
            foreach (SFSObject obj in buff){
                Debug.Log("Paquete NRO: " + num);
                num++;
                NetworkTransform ntransform = NetworkTransform.FromSFSObject(obj);
                if (recipient!=null) {
                    recipient.addObject(ntransform);
                }
            }	*/
        }
    }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:34,代码来源:NetworkManager.cs

示例11: Setup

 public void Setup(ISFSObject obj)
 {
     particleSystem.renderer.sortingLayerName = "2 Middle Lower UI";
     this.gwName = obj.GetUtfString("NAME");
     this.state = obj.GetUtfString("STATE");
     this.owner = obj.GetUtfString("OWNER");
     this.atk = obj.GetInt("ATK");
     this.def = obj.GetInt("DEF");
     this.type = obj.GetUtfString("TYPE");
     ISFSArray sws = obj.GetSFSArray("SW");
     this.region = obj.GetUtfString("REGION");
     this.sw = new string[3];
     this.sw[0] = (string) sws.GetElementAt(0);
     this.sw[1] = (string) sws.GetElementAt(1);
     this.sw[2] = (string) sws.GetElementAt(2);
     mg = GameObject.Find("Manager").GetComponent<Manager>();
     gameObject.transform.position = new Vector3((float)obj.GetDouble("X")*mg.getScale().x,(float)obj.GetDouble("Y")*mg.getScale().y,1F);
     gameObject.transform.localScale = new Vector3(0.25f,0.25f,0.25f);
 }
开发者ID:Hargalaten,项目名称:meGAMEss,代码行数:19,代码来源:Gateway.cs

示例12: Update

 public void Update(ISFSObject obj)
 {
     this.owner = obj.GetUtfString("OWNER");
     this.atk = obj.GetInt("ATK");
     this.def = obj.GetInt("DEF");
     ISFSArray sws = obj.GetSFSArray("SW");
     this.sw = new string[3];
     this.sw[0] = (string) sws.GetElementAt(0);
     this.sw[1] = (string) sws.GetElementAt(1);
     this.sw[2] = (string) sws.GetElementAt(2);
 }
开发者ID:Hargalaten,项目名称:meGAMEss,代码行数:11,代码来源:Gateway.cs

示例13: OnPlayersInfo

 /// <summary>
 /// Информация о игроках
 /// </summary>
 /// <param name="data"></param>
 void OnPlayersInfo(ISFSObject data)
 {
     SetupServerPlayers(data.GetSFSArray("players"));
     AddServerPlayerToClientPlayer();
 }
开发者ID:PanCrucian,项目名称:IOL,代码行数:9,代码来源:Game.cs

示例14: OnCirclesInfo

 /// <summary>
 /// Пришла информация о состоянии кружочков
 /// </summary>
 /// <param name="data"></param>
 void OnCirclesInfo(ISFSObject data)
 {
     SetupCircles(data.GetSFSArray("circles"));
 }
开发者ID:PanCrucian,项目名称:IOL,代码行数:8,代码来源:Game.cs


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