Cover ; Copyright; Credits; About the Author; Acknowledgment; About the Reviewer; www.PacktPub.com; Customer Feedback; Table of Contents; Preface; Chapter 1: A Flat World in Unity; Learning game development; Tower defense games; Designing our game; Getting ready; Remembering the past to build the future; Organizing the project; A 2D world; Sprites; Sprite Renderer; Importing new friends; The Sprite Editor; Manual mode; Automatic mode; Polygonal mode; Sprite Editor for UI-9-slice scaling; Preparing the assets; Scenes as levels; Setting proportions; There is more about the Unity interface.
HomeworkSummary; Chapter 2: Baking Cupcake Towers; 2D objects; Parenting game objects; Difference between world coordinates and local coordinates; Ordering the different layers with Z-Buffering; Unfolding the map; Layers and tags; Prefabs; The game view; Math background; Scripting in Unity; Creating new scripts; Basics about scripts; Variables; Attributes; Functions; Comments; Execution order; Making sprinkles; The projectile class; Scripting the projectile mother class; Tons of sprinkles through Prefabs; Baking cupcakes towers; What a cupcake tower does; Scripting the cupcake tower.
Shooting to the pandasUpgrading the cupcake tower, making it even tastier; A pre-baked cupcake tower through Prefabs; More about coding in Unity; Static variables; Inheritance; Random numbers in Unity; Homework; Summary; Chapter 3: Communicating with the Player
the User Interface; Getting ready; Designing the user interface; Programming the user interface; User interface system; Canvas; Screen space -€Overlay; Screen space -€Camera; World space; Draw order of UI elements; Visual components; The Image component; The Text component; Basic transformations; The Rect Tool; The Rect Transform.
Layout componentsFitters; Layout groups; The layout element component; Interaction components; The selectable base class; Interactable option; Transition options; Navigation options; Button; Toggle and Toggle Group; Slider; Scrollbar; Dropdown; Input Field; Scroll Rect; More about UI rendering; The canvas renderer; More visual components; UI effect components; UI and lights; The canvas components; Canvas group; Event system; Scripting user interfaces; Designing the interface for our game; Preparing the scene for the UI; Creating a health bar; Creating and placing the health bar.
Scripting the health barImplementing the sugar meter; Creating and place; Scripting the sugar meter; More about UI scripting -€handlers; What about all the rest?; Homework; Summary; Chapter 4: No Longer Alone
Sweet-Toothed Pandas Strike; Getting ready; Animations; A historical overview; Animations in video games; Workflow for animations; Animations clips and the Animator component; Creating Animation clips with a controller; The Animator component; Creating the other animation clips; The Animator; The Animator window; The Animator state machine; The Animator states; Special states.