Skip to content

Commit 23404bd

Browse files
committed
feat: Add newer metions in the credits and logic to support multiple columns in segments
1 parent b60769a commit 23404bd

File tree

2 files changed

+52
-8
lines changed

2 files changed

+52
-8
lines changed

Assets/Resources/credits.txt

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ bird_task: BirdTask
44

55
segment_title:Equipo de desarrollo
66
segment:Líder del equipo de desarrollo|Santiago Gallo
7-
segment:Programador|Santiago Gallo, Stiven Ortiz, Santiago Rey, Carlos Rojas
8-
segment:Artista|Santiago Gallo, Stiven Ortiz, Santiago Rey, Carlos Rojas
7+
segment:Programador|Santiago Gallo, Stiven Ortiz;Santiago Rey, Carlos Rojas
8+
segment:Artista|Santiago Gallo, Stiven Ortiz;Santiago Rey, Carlos Rojas
99
segment:Animador|Santiago Gallo, Santiago Rey, Stiven Ortiz
1010
segment:Diseñador de nivel|Carlos Rojas
1111
segment:Guionista|Santiago Gallo, Stiven Ortiz, Santiago Rey
@@ -18,14 +18,38 @@ segment:Líder de pruebas|Stiven Ortiz
1818
segment:Líder de logística|Carlos Rojas
1919
segment:Líder de documentación|Carlos Rojas
2020

21+
segment_title: Recursos de UI
22+
segment:Iconos de minimapa|lutfix (FlatIcon)
23+
segment:Iconos de redes sociales|Freepik (Freepik)
24+
segment:UI de dialogo|Kenney (Kenney)
25+
26+
segment_title: Sonidos
27+
segment:Musica|
28+
segment:Efectos de sonido|
29+
30+
segment: Software y Tecnología
31+
segment:Animaciones|Mixamo
32+
segment:Modelaje|Adobe Fuse, Blender, Revit Autodesk
33+
segment:Edición de imagenes|Photoshop, Photopea
34+
segment:Dialogos|Inky
35+
segment:VCS|Github, Git, GitKraken
36+
37+
2138
segment_title:Colaboradores de la Pontificia Universidad Javeriana
2239
segment:Director del proyecto de grado|Ing. Leonardo Flórez Valencia
2340
segment:Asesor técnico|Ing. John Higuera
2441

42+
segment_title:Probadores de Experiencia de Usuario
43+
segment:Probadores Alpha|Nahuel Matías Rotela, José Serrano Serna, Angélica Maritza Lozano Reyes, Germán Elías Fraga, Diego Nicolás Sequeira López, Bruno Alejandro Guardia, Camilo Alejandro Nossa Calderón, Erick Santiago Garavito Villamil, Nicolás Forero Salgado, Kevyn Orlando Prada Figueroa, Luis Alejandro Bravo Ferreira, Daniel Felipe Barreto Rojas, Cinthia Maribel Lara Begazo, Luis Ángel Sierra Lozano; Juana Valentina Grijalba Otálora, Camila Guzmán, Lara Salcedo Franco, Jia Wei Huang Ke, Juan Diego Córdoba Fernández, David Alejandro Sequera Liévano Danna Morena Goñi, Juan Páez, Jesús Daniel Molina Emiliani, Jorge Chantryt, José Tomás Suárez Acero, Shyrley Dayanna Ortiz Noreña, Daniel Cruz Gutiérrez, Félix Antonio Ortiz David, Noelly Noreña Salas
44+
45+
2546
segment_title:Colaboradores de Awaq
2647
segment:Presidente de Awaq|José Serrano
2748
segment:Equipo tecnológico de Awaq|Nahuel Rotela, Cristian Santa
2849
segment:Directora de la EBNC|Angelica Lozano
2950

3051
additional_message:Gracias por jugar
31-
additional_message:Pontifica Universidad Javeriana 2024
52+
additional_message:Este juego contiene contenido con derechos de autor de sus respectivos propietarios.
53+
aditional_message: Todos los derechos son reservados a los autores y creadores originales.
54+
additional_message:Ecoguardians 2.0 ©
55+
additional_message:Pontificia Universidad Javeriana 2024

Assets/Scripts/Credits/CreditManager.cs

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,23 +101,43 @@ void CreateSegment(string segmentData)
101101
string role = parts[0].Trim(); // The role (e.g., "Programmer")
102102
string names = parts[1].Trim(); // The names (e.g., "John Doe, Jane Smith, Bob Brown")
103103

104-
// Replace commas with newlines so each name is on a different line
105-
names = names.Replace(",", "\n");
104+
// Split names by ';' to create multiple columns if needed
105+
string[] nameGroups = names.Split(';');
106106

107-
// Instantiate the prefab and assign the role and names text
107+
// Instantiate the segment prefab and assign the role text
108108
GameObject segment = Instantiate(segmentPrefab, creditsContainer);
109109

110-
// Assume the prefab has two TextMeshProUGUI components for the role and the names
110+
// Assume the first child TextMeshProUGUI is for the role title
111111
TextMeshProUGUI[] texts = segment.GetComponentsInChildren<TextMeshProUGUI>();
112112
texts[0].text = role; // Assign the role text
113-
texts[1].text = names; // Assign the names text with newlines
113+
114+
// Loop through the name groups and create a corresponding Names object for each group
115+
for (int i = 0; i < nameGroups.Length; i++)
116+
{
117+
string nameGroup = nameGroups[i].Trim().Replace(",", "\n"); // Replace commas with newlines
118+
119+
// Instantiate a new Names object for each group after the first
120+
if (i == 0)
121+
{
122+
// Use the first existing names object in the prefab
123+
texts[1].text = nameGroup;
124+
}
125+
else
126+
{
127+
// Create a new Names object for additional groups
128+
GameObject newNamesObject = Instantiate(texts[1].gameObject, texts[1].transform.parent);
129+
TextMeshProUGUI newNamesText = newNamesObject.GetComponent<TextMeshProUGUI>();
130+
newNamesText.text = nameGroup;
131+
}
132+
}
114133
}
115134
else
116135
{
117136
Debug.LogError("Error processing segment: " + segmentData);
118137
}
119138
}
120139

140+
121141
void CreateBirdTask(string birdTaskText)
122142
{
123143
// Instantiate the BirdTask prefab and parent it to the credits container

0 commit comments

Comments
 (0)