コード例 #1
0
    public void inicializar(ArrayList Sprints)
    {
        if (userStories1 != null)
            userStories1.destruir ();
        if (userStories2 != null)
            userStories2.destruir ();
        if (sprintBar != null)
            sprintBar.destruir ();

        sprintBar = new CuadriculaSprint(GameObject.Find ("sprintbar"));
        if (comienzosprint > Sprints.Count)
            comienzosprint = 0;
        sprintBar.setSprintActual (comienzosprint);

        for (int i = 0; i < Sprints.Count;i++){
            if(!((Sprint)Sprints[i]).Cerrado()){
                Text3DCuboSprint cubo = new Text3DCuboSprint(((Sprint)Sprints[i]).getTitulo(),i);
                cubo.setus(((Sprint)Sprints[i]));
                cubo.setMaterial (materialTexto);
                cubo.setFont (fontTexto);
                sprintBar.addElemento(cubo);
            }
        }

        // si hay Sprints    si hay 1 es el PB
        if (Sprints.Count >= 2) {
            Debug.Log (comienzosprint);
            Sprint s = (Sprint)Sprints [comienzosprint];
            if(!s.Cerrado()){
                s.setHistoriales();
                ArrayList listaStories = new ArrayList ();
                foreach (UserStory us in s.getListaStories())
                    if (!us.Cerrada ())
                        listaStories.Add (us);

                int i = comienzoUserStory;
            //Reviso que haya user Stories
                if (listaStories.Count > i) {
                    userStories1 = new CuadriculaCompleja (GameObject.Find ("filaUserStory1"));//
                    Text3DCuboUS story1 = new Text3DCuboUS(((UserStory)listaStories[i]));
                    story1.setMaterial (materialTexto);
                    story1.setFont (fontTexto);
                    userStories1.setUserStory(story1);
                    //story1.dibujarObjetoEnQuad(userStories1.FindChild("story"),12);
                    recorrerTareas ((UserStory)listaStories [i], userStories1);
                    i = i+1;
                    if (listaStories.Count > i){
                        userStories2 = new CuadriculaCompleja (GameObject.Find ("filaUserStory2"));//
                        Text3DCuboUS story2 = new Text3DCuboUS(((UserStory)listaStories[i]));
                        story2.setMaterial (materialTexto);
                        story2.setFont (fontTexto);
                        userStories2.setUserStory(story2);
                        //story2.dibujarObjetoEnQuad(userStories2.FindChild("story"),12);
                        recorrerTareas ((UserStory)listaStories [i], userStories2);
                        i = i + 1;
                    }
                    i = i + 1;
                }

            }

        }
    }
コード例 #2
0
    public void recorrerTareas(UserStory u, CuadriculaCompleja c)
    {
        foreach (Task t in u.getListaTareas()) {
            Text3DCubo cubotarea = new Text3DCuboTask (t);
            cubotarea.setMaterial (materialTexto);
            cubotarea.setFont (fontTexto);
            switch (t.getEstado ()) {
            case "TO DO":
                c.addElementoToDo (cubotarea);
                break;
            case "DOING":
                c.addElementoDoing (cubotarea);
                break;
            case "ON TEST":
                c.addElementoOnTest(cubotarea);
                break;
            case "DONE":
                c.addElementoDone (cubotarea);
                break;
            }

        }
    }