Introducci贸n
Bienvenida y presentaci贸n del proyecto
Instalaci贸n de los SDKs
Empezando Nuestro Proyecto
Inicializar el proyecto
Control de versiones
Importando nuestros assets
Teor铆a de Gameplay
Como resolver problemas de gameplay
Match 3 simplificado
Mec谩nica Principal
Creando la cuadr铆cula
Ajustando la c谩mara
Sistema de coordenadas para instanciar las piezas
Instanciando las piezas en la cuadr铆cula
Moviendo las piezas
Intercambiando las piezas de lugar
Permitiendo solo ciertos tipos de movimientos
Creando las funciones del match 3
Usando el match 3 en nuestro juego
Eliminando los matches por defecto
Colapsando las piezas
Match 3 combo
Rellenando las piezas
Mejorando la animaci贸n de las piezas
Publicacion
Momento del primer build para Android
Momento del primer build para iOS
Dise帽o del juego
Hablemos de dise帽o
Agregando un sistema de puntos
Sistema de tiempo
Interfaz para el sistema de tiempo
Creando sistema de UI
Pantalla de game over
Agregando funcionalidad a la pantalla de game over
Reiniciando el juego
Agregando audio
Terminando el juego
Conclusiones
Conclusiones del curso
You don't have access to this class
Keep learning! Join and start boosting your career
Welcome to this exciting lesson on how to manage your parts grid in Unity. Throughout this process, we will delve into two fundamental aspects: the coordinate system and the pieces that will be positioned on it using tiles. Let's dive into the technical details that facilitate this process.
The first crucial step is the establishment of our coordinate system. This system will be the dawn of our grid in Unity, where each space is clearly identified. Initially, we will need a new script:
Script Creation:
Tile
.Script Properties: Within the Tile
class, define the following properties:
public int X;public int Y;public void Void;
Setup function:
Start
and Update
functions.setup
function that receives these properties as parameters.public void Setup(int x, int y, void myVoid) { X = x; Y = y; Void = myVoid;}
Once you have created the Tile
script, it is time to integrate it with your prefabs in Unity. This will allow each space in your grid to be represented properly.
Prefab configuration:
empty
prefab and add the Tile
component to it.Edit the Grid Script:
Void
script and edit the SetupVoid
method, which is where the grid spaces are created.GetComponent<Tile>()
to access the Tile
component of each instantiated object.?....
Coordinate Assignment:
setup
function of the Tile
component.tileComponent?.Setup(x, y, this);
x
and y
are the coordinate positions, and this
is used to reference the current grid.Go back to Unity and test your setup. When you run your project:
Tile
component assigned with the correct coordinates.0, 0
, ascending progressively.Each of these objects now not only represents graphically a space in the grid, but also has a meaning within Unity and the coordinate system. This system prepares us to integrate, in a future class, the pieces that will occupy these spaces, ensuring that each one aligns correctly with its position on the grid.
Keep exploring and believe in your abilities; you are closer to having a fully functional game. Come on, you can do it!
Contributions 0
Questions 1
Want to see more contributions, questions and answers from the community?