Book Image

Mastering Unity 2D game development

By : Simon Jackson
Book Image

Mastering Unity 2D game development

By: Simon Jackson

Overview of this book

Table of Contents (21 chapters)
Mastering Unity 2D Game Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Overview
Index

Putting it together


Now as I stated earlier, this section is going to be big and full of surprises. Some things are just what you need to do in order to flex Unity in the way we want to use it. Others are real gotchas that can leave you scratching your head and searching for the answer endlessly.

We'll start with the battle state machine, getting the player ready for the battle and then following up with some GUI interaction for the player to use in order to begin his or her assault in the battle. In the next chapter, we'll close the loop in the player's battle process and progress the state machine over to the opponents.

Let's begin!

The battle state manager

Starting back in our Battle scene, we need to replace our temporary state machine with a proper one using all of Mecanim's handy features. Although we will still only be using a fraction of the functionality with the RPG sample, I advise you to investigate and read more about its capabilities.

Navigate to Assets\Animation\Controllers and...