Abstract
This chapter deals with organizing instructions in different methods and classes. You will learn how to write your own methods, properties, and classes and how you can use these programming concepts to design different game object classes. We will discuss the difference between values and references and what the null keyword means in that context. Finally, we will show the difference between a class and a struct. We further develop the Painter game in this chapter to incorporate classes that are used to create the instances of the various game objects in the game.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer-Verlag GmbH Germany, part of Springer Nature
About this chapter
Cite this chapter
van Toll, W., Egges, A., Fokker, J.D. (2019). Basic Game Objects. In: Learning C# by Programming Games. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-59252-6_7
Download citation
DOI: https://doi.org/10.1007/978-3-662-59252-6_7
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-662-59251-9
Online ISBN: 978-3-662-59252-6
eBook Packages: Computer ScienceComputer Science (R0)