Yo creo que en vez de crear tantas variables publicas hubiera sido mejor una lista de una clase serializada
El controlador del juego
Archivos del curso
隆Bienvenido a los cursos autorizados de Unity!
Bienvenida al curso y requisitos para utilizar el HTC Vive
Inicializando nuestro proyecto y configurando nuestro PlayerSettings para trabajar con VR
Utilizando nuestros controles de HTC Vive
Creando nuestro mundo 3D en Unity
Comenzando a crear nuestro escenario 3D con los Unity Standard Assets
Preparando el terreno de nuestro escenario
Texturizando el terreno de juego
Agregando detalles utilizando vegetaci贸n
Agregando cesped y viento a nuestro nivel
Terminando nuestro entorno 3D, agregando un skybox al proyecto
Utilizando la unity asset store para obtener nuestra arma y escudo
El realismo del VR: Programando a nuestro personaje
Asignando un control de realidad virtual a nuestras armas
Input Manager de nuestros controles de VR
Accediendo a los botones de nuestro control
Preparando nuestro proyectil
Utilizar los sensores de los Vive Controllers para lanzar proyectiles
Corrigiendo los bugs de nuestra arma
Agregando Colliders y Rigid Bodies a nuestro playerController y armas
Utilizando Getters y Setters para manejar nuestas barras de vida
El realismo del VR: Creaci贸n de HUD (Heads Up Display) y generando enemigos
HUD's en VR
Terminando nuestros HUDs de mana y vida
Creando nuestro script de da帽o
Asignando nuestros huds a los valores de vida y de mana de nuestro personaje
Agregando enemigos
A帽adiendo colliders a nuestros enemigos
A帽adiendo animaciones de muerte a nuestros dragones
Spawn de enemigos: Generando enemigos sistem谩ticamente
El realismo del VR: Programando la IA de nuestro juego
Programando una IA b谩sica: Waypoints
Programando a nuestro enemigo para que pueda seguir Waypoints
Terminando la l贸gica de waypoints
Puliendo la l贸gica de nuestro enemigo
A帽adiendo diversos puntos de 'Spawn' para enemigos y cierre del curso
You don't have access to this class
Keep learning! Join and start boosting your career
To program the logic of our video game we will create some scripts in C# and we will organize them in the assets of the project, inside a new folder that we will call Scripts
.
The first script that we create is the one that will define the logic in the use of the player's weapons, so we must create a new empty object inside the ViveCameraRig
group that we will call Player to link it to this first script. This script will be the main base of all the logic of our game.
From this moment on we will use the VisualStudio suite for everything related to the programming of the logic of our project.
We will define the variables that will make reference to each one of the objects or 3D elements that we want to control: rightHand, leftHand, rightWeapon, leftWeapon, rightWeaponAlt and magicLaunchPoint
, and we define them as public variables so that they are available from the Unity editor.
We will also define some constants and public variables that will allow us to have control of the weapons from the other scripts. Later we will see that we do not always need the variables to be public.
Finally, when returning to the Unity editor, we will have available all these variables in the Inspector
panel and we will only have to link them with each of the respective objects, from the hierarchy panel of our project.
Contributions 1
Questions 0
Yo creo que en vez de crear tantas variables publicas hubiera sido mejor una lista de una clase serializada
Want to see more contributions, questions and answers from the community?