Advertisement

Organizing Game Objects

  • Wouter van Toll
  • Arjan Egges
  • Jeroen D. Fokker
Chapter

Abstract

In this chapter, we are going to look at the similarities between the different types of game objects and how we can express these similarities in C#. The main technique used for this is inheritance. Inheritance is a technique that is used to structure related classes in a hierarchy. We will show how to override methods in a subclass to provide specific behavior for that class. We will deal with access modifiers for class members. We will also introduce the concept of polymorphism, which allows calling the right version of a method automatically.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag GmbH Germany, part of Springer Nature 2019

Authors and Affiliations

  • Wouter van Toll
    • 1
  • Arjan Egges
    • 2
  • Jeroen D. Fokker
    • 3
  1. 1.RennesFrance
  2. 2.UtrechtThe Netherlands
  3. 3.Department of Information and Computing SciencesUtrecht UniversityUtrechtThe Netherlands

Personalised recommendations