Join Jesse Freeman for an in-depth discussion in this video Detecting when the player is standing, part of Unity 5: 2D Essential Training (2015).
- Now before we can actually make the player jump,…we're gonna need to know when the player…is actually standing on something solid.…In this case, we're gonna build the most basic class…that'll manage whether the player is in motion…or if the player is being stopped…by another physical object.…Let's go into our Scripts folder…and create a new C# script called InputState.…Then let's open this up in MonoDevelop.…Now the idea behind the InputState…is that we're gonna have any script that needs…to change the motion or the movement of the player…looking at the InputState to determine…what that actual, physical state of the player is.…
In this class we're gonna keep track…of the absolute x and y values…of the velocity of the player.…We're gonna note when the player is standing.…And we're also gonna keep track…of when any type of input is taking place.…In this case, whatever button makes our player jump.…So let's start adding these properties to the class.…We'll make a public bool to represent the action button.…Next, we'll need a public float…
Super Zombie Runner riffs off the popular endless runner genre: a one-button casual game that's not only fun to play but exciting to build. The focus of the work is a reusable code base that you can extend and make your own, while learning the basics of object pooling, supporting multiple screen resolutions, tracking scoring, and multi-platform publishing. Along the way, Jesse covers key Unity features, such as working with sprites, creating animations, and leveraging the UI components.
- Working with sprites and animation
- Creating the player
- Spawning GameObjects
- Adding obstacles and collisions
- Building the game objects and logic
- Managing game state
- Creating pixel-perfect cameras
- Designing for multiple screen resolutions
- Adding scores
- Optimizing performance
- Publishing to desktop, web, and mobile platforms
Skill Level Intermediate
1. Working with Sprites
2. Creating Repeating Textures
3. Creating Obstacles
4. Object Pooling
5. Creating the Player
6. Setting Up the Game
7. Adding UI
8. Creating More Obstacles
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.