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


C# SFSObject.GetSFSArray方法代码示例

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


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

示例1: generaHighScores

 //Consulta de puntajes altos
 public void generaHighScores(SFSObject dataObject)
 {
     //obtiene arreglo resultado
     this.ultimaConsultaHighScores= new ArrayList();
     ISFSArray resultado = dataObject.GetSFSArray("result");
     for (int i=0; i < resultado.Size(); i++){
         SFSObject item= (SFSObject) resultado.GetSFSObject(i);
         string user= item.GetUtfString("userid");
         string score= ((double) item.GetDouble("score")).ToString();
         HighScoreData nuevo= new HighScoreData(user, score);
         this.ultimaConsultaHighScores.Insert(i, nuevo);
     }
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:14,代码来源:GameLogManager.cs

示例2: mostrarConsulta

    public void mostrarConsulta(SFSObject dataObject)
    {
        //obtiene arreglo resultado
        ISFSArray resultado = dataObject.GetSFSArray("result");

        for (int i=0; i < resultado.Size(); i++){
            //obtiene objeto y lo muestra
            SFSObject item= (SFSObject) resultado.GetSFSObject(i);
            string[] keys = item.GetKeys();
            for(int j=0; j< keys.Length; j++){
                string s = item.GetUtfString(keys[j]);
                Debug.Log(s);

            }
        }
    }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:16,代码来源:TutorialManagerDB.cs

示例3: fromSFSObject

 public override void fromSFSObject(SFSObject item)
 {
     associatedTests = new List<Test> ();
     this.id_Criteria = item.GetLong("Id_Criteria");
     this.id_Story	 = item.GetLong("Id_Story");
     this.descripcion = item.GetUtfString ("Descripcion");
     this.titulo = item.GetUtfString ("Titulo");
     this.prioridad = item.GetLong("Prioridad");
     ISFSArray tests=item.GetSFSArray("listaTests");
     if(tests != null)
         foreach(SFSObject test in tests)
     {
         Test t=new Test();
         t.fromSFSObject(test);
         associatedTests.Add(t);
     }
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:17,代码来源:AcceptanceCriteria.cs

示例4: fromSFSObject

    public override void fromSFSObject(SFSObject item)
    {
        this.id_Task = item.GetLong ("id_Task");
        this.id_Story=item.GetLong("id_Story");
        this.descripcion = item.GetUtfString ("descripcion");
        this.prioridad = item.GetInt ("prioridad");
        this.responsable = item.GetUtfString ("responsable");
        this.estado = item.GetUtfString ("estado");
        this.t_Total = item.GetInt ("t_Total");
        this.t_Estimado = item.GetInt ("t_Estimado");
        this.titulo = item.GetUtfString ("titulo");
        ISFSArray t = item.GetSFSArray ("testsAsociados");

        foreach (SFSObject s in t) {
            this.idTests.Add (s.GetLong ("Id_Test"));
        }
        // falta el burndownchart
    }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:18,代码来源:Task.cs

示例5: cargarUsuarios

 public void cargarUsuarios(SFSObject dataObject)
 {
     ISFSArray usuarios=dataObject.GetSFSArray("usuarios");
        foreach (SFSObject userObject in usuarios){
         UserVS u = new UserVS(userObject.GetUtfString("nick"),userObject.GetUtfString("rol"));
         listaUsers.Add(u);
        }
        smartFox.Send(new ExtensionRequest("cargarDatos", param));
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:9,代码来源:MultiPlayer.cs

示例6: cargarHistorial

 public void cargarHistorial(SFSObject dataObject)
 {
     List<EjecucionTest> lista = new List<EjecucionTest> ();
     ISFSArray historial=dataObject.GetSFSArray("Historial");
     foreach (SFSObject resultado in historial) {
         EjecucionTest e  = new EjecucionTest(resultado);
         lista.Add(e);
     }
     long id_test;
     if (lista.Count > 0) {
         id_test = lista [0].getIdTest ();
         Test t = getTest (id_test);
         foreach (EjecucionTest e in lista) {
                 e.setNombre (t.getName ());
         }
         t.setHistorial (lista);
     }
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:18,代码来源:MultiPlayer.cs

示例7: cargarDatos

    public void cargarDatos(SFSObject dataObject)
    {
        ISFSArray sprints=dataObject.GetSFSArray("sprints");

          	foreach (SFSObject sprintObject in sprints){
            Sprint sprint = new Sprint();
            sprint.fromSFSObject(sprintObject);
            listaSprints.Add(sprint);
        }

        foreach(Sprint item in listaSprints)
        {	Debug.Log(item.getId_Sprint());
            foreach (UserStory story in item.getListaStories()){
                Debug.Log (story.getDescripcion());
                   foreach (Task tarea in story.getListaTareas()){
                      Debug.Log (tarea.getDescripcion());

                    }
            }
        }

        backlog.cargarVector();
        backlog.cargarInicial();

        crearPlanoTask planoTask = (crearPlanoTask)(GameObject.Find("panelTaskBoard")).GetComponent("crearPlanoTask");
        planoTask.inicializar(listaSprints);
        poker.inicializar();

        ISFSArray dailyMeetings = dataObject.GetSFSArray("dailyMeetings");
        foreach (SFSObject dailyMeetingObject in dailyMeetings){
            DailyMeeting dailyMeeting = new DailyMeeting();
            dailyMeeting.fromSFSObject(dailyMeetingObject);
            listaDailyMeetings.Add(dailyMeeting);
        }

        GUI_CargarDailyPanel dailyPanel = (GUI_CargarDailyPanel)(GameObject.Find ("DailyMeetingPlane")).GetComponent("GUI_CargarDailyPanel");

        try{

            dailyPanel.inicializar(listaDailyMeetings);

        //	GUI_CargarDailyPanel usuario = (GUI_CargarDailyPanel)(GameObject.Find ("DailyMeetingPlane")).GetComponent("GUI_CargarDailyPanel");
        //	usuario.inicializar ();

        } catch {
            Debug.Log ("el panel lo rompe");
        }
        datosCargados=true;
    }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:49,代码来源:MultiPlayer.cs

示例8: agregarSprint

 public void agregarSprint(SFSObject dataObject)
 {
     Sprint sprint=new Sprint();
     Sprint sprint0 = (Sprint)listaSprints[0];
     sprint.fromSFSObjectSinUS(dataObject);
     ISFSArray stories=dataObject.GetSFSArray("listaStories");
      	foreach(SFSObject story in stories)
     {
         UserStory userStory=new UserStory();
         userStory.fromSFSObject(story);
         sprint.addUserStory(sprint0.removeUserStory(userStory.getId_UserStory()));
     }
     listaSprints.Add(sprint);
     crearPlanoTask planoTask = (crearPlanoTask)(GameObject.Find("panelTaskBoard")).GetComponent("crearPlanoTask");
     planoTask.inicializar(listaSprints);
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:16,代码来源:MultiPlayer.cs

示例9: fromSFSObject

    public override void fromSFSObject(SFSObject item)
    {
        this.id_sprint=item.GetLong("Id_Sprint");
        this.id_proyecto=item.GetLong("id_Proyecto");
        this.estado=item.GetUtfString("estado");
        this.fechaInicio=System.DateTime.Parse(item.GetUtfString("fechaInicio"));//new System.DateTime(us.GetLong ("fechaInicio"));
        this.fechaFin=System.DateTime.Parse(item.GetUtfString("fechaFin"));//new System.DateTime(us.GetLong ("fechaFin"));
        this.titulo=item.GetUtfString("titulo");
        this.cerrado = item.GetBool("cerrado");
        string s = item.GetUtfString ("fecha_ultimo_cambio");
        if(!s.Equals(""))
            this.fecha_ultimo_cambio = System.DateTime.Parse(s);
        ISFSArray stories=item.GetSFSArray("listaStories");
        foreach(SFSObject story in stories)
        {
            UserStory UserStory=new UserStory();
            UserStory.fromSFSObject(story);

            listaStories.Add(UserStory);
        }
        Debug.Log (this.fecha_ultimo_cambio.ToString ());
    }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:22,代码来源:Sprint.cs

示例10: generaNews

 //Genera el hash segun la consulta previa
 private void generaNews(SFSObject dataObject)
 {
     //Genera un hash con todas las noticias ordenando con la clave de id de noticia
     this.allNews.Clear();
     ISFSArray resultado = dataObject.GetSFSArray("result");
     this.cantNews= resultado.Size();//guarda la cantidad de retultados de la consulta
     for (int i=0; i < this.cantNews; i++){
         SFSObject item= (SFSObject) resultado.GetSFSObject(i);
         int identificador= item.GetInt("news_id");								//saca la id
         string titulo= item.GetUtfString("title");								//saca el titulo
         string contenido= item.GetUtfString("content");							//saca el contenido
         News nueva= new News(identificador, titulo, contenido);
         this.allNews.Add(identificador, nueva);												//inserta la noticia nueva al hash
     }
     //Debug.Log("LLEGUE PRIMERO AL GENERANEWS ----------------------------------------------------------");
     //Debug.Log("TERMINE DE BAJAR LAS NOTICIAS! Hay "+allNews.Count +" noticias   ----------------------------------------------------------");
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:18,代码来源:NewsManager.cs

示例11: SetupTheFox

    private void SetupTheFox()
    {
        bool debug = true;
        running = true;
        if (SmartFoxConnection.IsInitialized)
        {
            smartFox = SmartFoxConnection.Connection;
        }
        else
        {
            smartFox = new SmartFox(debug);
        }
        currentRoom = smartFox.LastJoinedRoom;
        clientName = smartFox.MySelf.Name;

        // set up arrays of positions
        positions = new List<Vector3>();
        GameObject[] spawnPoints = GameObject.FindGameObjectsWithTag("SpawnTag");
        for (int i = 0; i < spawnPoints.Length; i++)
        {
            positions.Add(spawnPoints[i].transform.position);
        }

        lobbyGameInfo = (SFSObject)currentRoom.GetVariable("gameInfo").GetSFSObjectValue();

        host = lobbyGameInfo.GetUtfString("host");
        numberOfTeams = lobbyGameInfo.GetInt("numTeams");
        numberOfPlayers = currentRoom.GetVariable("numberOfPlayers").GetIntValue();
        teams = (SFSArray)lobbyGameInfo.GetSFSArray("teams");
        gameLength = lobbyGameInfo.GetInt("gameLength");

        gameLength = (int)lobbyGameInfo.GetInt("gameLength") * 1000;

        SetupListeners();
    }
开发者ID:ice0001,项目名称:Cubes-in-Space,代码行数:35,代码来源:GameManager.cs

示例12: handleRacePositionsBroadcast

	public void handleRacePositionsBroadcast(SFSObject aObject) {
		if(aObject.ContainsKey("a")) {
			SFSArray a = (SFSArray) aObject.GetSFSArray("a");
			int f = aObject.GetInt("f");
			for(int i = 0;i<a.Size();i++) {
				initPacketFromHost((SFSObject) a.GetSFSObject(i));
			}
		//Time.timeScale = 0.01f;

			for(int i = f;i<framesPassed;i++) {
				for(int j = 0;j<this.sortedHorses.Count;j++) {
					sortedHorses[j].FixedUpdate();
				}
			}
			for(int i = 0;i<sortedHorses.Count;i++) {
				Vector3 posDiff = sortedHorses[i].transform.position-sortedHorses[i].originalPosition;
			//	Debug.Log ("Position was wrong by: "+posDiff+" last applied speed was: "+sortedHorses[i].lastAppliedSpeed);
			}
		}
		
	}
开发者ID:dongvanhung,项目名称:HA3D,代码行数:21,代码来源:RaceTrack.cs

示例13: dataToString

 private string dataToString(SFSObject data)
 {
     ISFSArray resultado = data.GetSFSArray("result");
     SFSObject item= (SFSObject) resultado.GetSFSObject(0);
     if (item != null) {
         string[] keys = item.GetKeys();
         return  item.GetUtfString(keys[0]);
     }
     return null;
 }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:10,代码来源:CustomizationManager.cs

示例14: fromSFSObject

    public override void fromSFSObject(SFSObject item)
    {
        listaTareas = new ArrayList();
        listaEstimacion = new ArrayList();
        listaCriterios = new ArrayList ();
        this.id_UserStory=item.GetLong("id_UserStory");
        this.id_Sprint = item.GetLong ("Id_Sprint");
        this.descripcion=item.GetUtfString("descripcion");
        this.prioridad=item.GetInt("prioridad");
        this.titulo=item.GetUtfString("Titulo");
        this.estadoEstimacion=item.GetInt("estadoEstimacion");
        this.id_proyecto=item.GetLong("id_proyecto");
        string s = item.GetUtfString ("fecha_ultimo_cambio");
        this.cerrada = item.GetBool("cerrada");
        if(!s.Equals(""))
            this.fecha_ultimo_cambio = System.DateTime.Parse(s);
        this.valorEstimacion = item.GetFloat("valorEstimacion");
        ISFSArray tareas=item.GetSFSArray("listaTareas");

        foreach(SFSObject tarea in tareas)
        {
            Task task=new Task();
            task.fromSFSObject(tarea);

            listaTareas.Add(task);
        }
        ISFSArray estimaciones=item.GetSFSArray("listaEstimacion");

        foreach(SFSObject estimacion in estimaciones)
        {
            Estimacion est=new Estimacion();
            est.fromSFSObject(estimacion);
            listaEstimacion.Add(est);
        }

        ISFSArray criterios=item.GetSFSArray("listaCriterios");
        if(criterios !=null)
        foreach(SFSObject criteria in criterios)
        {
            AcceptanceCriteria ac=new AcceptanceCriteria();
            ac.fromSFSObject(criteria);
            listaCriterios.Add(ac);
        }
    }
开发者ID:CristianCosta,项目名称:Kinect,代码行数:44,代码来源:UserStory.cs

示例15: Start

    void Start()
    {
        Debug.Log("start game lobby");
        smartFox = SmartFoxConnection.Connection;
        currentActiveRoom = smartFox.LastJoinedRoom;

        smartFox.AddLogListener(LogLevel.INFO, OnDebugMessage);
        screenW = Screen.width;
        AddEventListeners();

        username = smartFox.MySelf.Name;

        lobbyGameInfo = (SFSObject)currentActiveRoom.GetVariable("gameInfo").GetSFSObjectValue();

        maxPlayers = currentActiveRoom.MaxUsers;
        host = lobbyGameInfo.GetUtfString("host");
        numberOfTeams = lobbyGameInfo.GetInt("numTeams");
        Debug.Log("start number of teams: " + numberOfTeams);
        if (GameValues.isHost)
            currentTeams = new int[8];

        teams = (SFSArray)lobbyGameInfo.GetSFSArray("teams");
        playerPerTeam = numberOfPlayers / numberOfTeams;
        gameLength = (int)lobbyGameInfo.GetInt("gameLength");

        //Make Contents for the popup gameLength list
        gameLengthList[0] = (new GUIContent("60"));
        gameLengthList[1] = (new GUIContent("120"));
        gameLengthList[2] = (new GUIContent("300"));
        gameLengthList[3] = (new GUIContent("600"));

        //Make Contents for the popup number of teams list
        teamNumberList[0] = (new GUIContent("2"));
        teamNumberList[1] = (new GUIContent("3"));
        teamNumberList[2] = (new GUIContent("4"));
        teamNumberList[3] = (new GUIContent("5"));
        teamNumberList[4] = (new GUIContent("6"));
        teamNumberList[5] = (new GUIContent("7"));
        teamNumberList[6] = (new GUIContent("8"));

        //Set team scroll positions to zero
        for(int i = 0; i < 8; i++)
        {
            teamScrollPositions.Add(Vector2.zero);
        }

        //Make a gui style for the lists
        listStyle.normal.textColor = Color.white;
        Texture2D tex = new Texture2D(2, 2);
        Color[] colors = new Color[4];
        for (int i = 0; i < 4; i++)
        {
            colors[i] = Color.white;
        }
        tex.SetPixels(colors);
        tex.Apply();
        listStyle.hover.background = tex;
        listStyle.onHover.background = tex;
        listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4;

        if (GameValues.isHost)
        {
            currentIDs.AddInt(0);
            GameValues.playerID = 0;
            GameValues.teamNum = 0;
            currentTeams[0]++;
            List<UserVariable> uData = new List<UserVariable>();
            uData.Add(new SFSUserVariable("playerID", GameValues.playerID));
            uData.Add(new SFSUserVariable("playerTeam", GameValues.teamNum));
            smartFox.Send(new SetUserVariablesRequest(uData));

            SFSObject gameInfo = (SFSObject)currentActiveRoom.GetVariable("gameInfo").GetSFSObjectValue();

            //send back to store on server
            List<RoomVariable> rData = new List<RoomVariable>();
            gameInfo.PutSFSArray("playerIDs", currentIDs);
            rData.Add(new SFSRoomVariable("gameInfo", gameInfo));
            smartFox.Send(new SetRoomVariablesRequest(rData));

        }

        if (currentActiveRoom.ContainsVariable("lastGameScores"))
        {
            Debug.Log("scores from last game are present, adding to the message window...");
            //write out the last games scores to the chat window
            //format:
            //scores: int array
            //winner: string
            SFSObject lastGameData = (SFSObject)currentActiveRoom.GetVariable("lastGameScores").GetSFSObjectValue();
            int[] scoresArray = lastGameData.GetIntArray("scores");
            string[] teamColors = lastGameData.GetUtfStringArray("teamColors");

            messages.Add("Previous Game's Scores");
            messages.Add("The Winner is... " + lastGameData.GetUtfString("winner").ToString());
            for (int i = 0; i < scoresArray.Length; i++)
            {
                string teamName = teamColors[i] + " Team";
                messages.Add(teamName + "\tscored " + scoresArray[i].ToString() + " points.");
            }
        }
//.........这里部分代码省略.........
开发者ID:eric-kansas,项目名称:Cubes-in-Space,代码行数:101,代码来源:GameLobby.cs


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