O'Reilly logo

Introduction to Game Design, Prototyping, and Development: From Concept to Playable Game with Unity and C#, 2nd Edition by Jeremy Gibson Bond

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 24

FUNCTIONS AND PARAMETERS

In this chapter, you learn to take advantage of the immense power of functions. You write your own custom functions that can take various kinds of variables as input arguments and can return a single variable as the function's result. I also cover some special cases of parameters for function input like function overloading, optional parameters, and the params keyword modifier, all of which will help you to write more effective, modular, reusable, and flexible code.

Setting Up the Function Examples Project

In Appendix A, "Standard Project Setup Procedure," detailed instructions show you how to set up Unity projects for the chapters in this book. At the start of each project, you will also see a sidebar like ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required