Unity Game Development Controller Input, Local Multiplayer & VFX
Class overview Class 6 Revision Project Settings - Input Setting up Keyboard & Xbox Controller Input Creating 2 Players Shooting a Fireball Particle Emitter Events & Delegates
Revision Introduction to Mixamo.com Setting up Player Setting up Enemy Setting up Collectibles Singleton - Coding Design Pattern Serialization of Data Saving Loading Advanced: Checkpoint System
Project Settings - Input Edit > Project Settings… > Input Positive & Negative Buttons (-1, 1) Type / Axis are determine type of input Joy Num determines controller ID Same name can be given to input entries Input can be inverted Input has to be setup for each action Input has to be setup for each player
Setting up Keyboard & Xbox Controller Input GetButton(), GetButtonDown(), GetAxis(), GetAxisRaw()
Creating 2 Players Create PlayerLogic (Movement, Jumping, …) Create AnimatorController (Idle, Walk, Run, Jump) Setup BlendTree (Add parameters) Set Animation Parameters from Code Determine PlayerID using Enum and ToString()
Shooting a Fireball Instantiate Object based on hand transform Initialize Fireball movement at correct time using animation event Attach Rigidbody and Trigger to detect collision
Particle Emitter Create Particle Emitter Experiment with attributes
Events & Delegates Send events with parameters from class X Subscribe / Listen to events from class Y Multiple classes can react to events without having access to each other
Q&A Do you have any questions related to the topics mentioned?