Reader small image

You're reading from  Learning C# by Developing Games with Unity - Seventh Edition

Product typeBook
Published inNov 2022
Reading LevelBeginner
PublisherPackt
ISBN-139781837636877
Edition7th Edition
Languages
Tools
Right arrow
Author (1)
Harrison Ferrone
Harrison Ferrone
author image
Harrison Ferrone

Harrison Ferrone is an instructional content creator for LinkedIn Learning and Pluralsight, tech editor for the Ray Wenderlich website, and used to write technical documentation on the Mixed Reality team at Microsoft. He is a graduate of the University of Colorado at Boulder and Columbia College, Chicago. After a few years as an iOS developer at small start-ups, and one Fortune 500 company, he fell into a teaching career and never looked back.
Read more about Harrison Ferrone

Right arrow

Intermediate OOP

An object-oriented mindset is crucial to creating meaningful applications and understanding how the C# language works behind the scenes. The tricky part is that classes and structs by themselves aren’t the end of the line when it comes to OOP and designing your objects. They’ll always be the building blocks of your code, but classes are limited to single inheritance, meaning they can only ever have one parent or superclass, and structs can’t inherit at all. So, the question you should be asking yourself right about now is simple: “How can I create objects from the same template and have them perform different actions based on a specific scenario?”

To answer this question, we’ll be learning about interfaces, abstract classes, and class extensions.

Interfaces

One of the ways to gather groups of functionality together is through interfaces. Like classes, interfaces are blueprints for data and behaviors, but with one...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Learning C# by Developing Games with Unity - Seventh Edition
Published in: Nov 2022Publisher: PacktISBN-13: 9781837636877

Author (1)

author image
Harrison Ferrone

Harrison Ferrone is an instructional content creator for LinkedIn Learning and Pluralsight, tech editor for the Ray Wenderlich website, and used to write technical documentation on the Mixed Reality team at Microsoft. He is a graduate of the University of Colorado at Boulder and Columbia College, Chicago. After a few years as an iOS developer at small start-ups, and one Fortune 500 company, he fell into a teaching career and never looked back.
Read more about Harrison Ferrone