A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://medium.com/codex/making-a-rts-game-7-polymorphism-take-2-unity-c-fe84d9d87844 below:

Making a RTS game #7: Polymorphism, take 2! (Unity/C#) | by Mina Pêcheux | CodeX

Making a RTS game #7: Polymorphism, take 2! (Unity/C#)

Let’s continue our RTS game and focus on the hierarchy of our classes! 5 min read

·

Apr 22, 2021

⬅️ Tutorial #6: Improving the UI | TOC | Tutorial #8: Boosting our selection feature ➡️

📕 Get the ebook and bonus material on Gumroad!
🚀 Find the code of this tutorial series on my Github!

In this tutorial, we are going to reorganise some of our classes to better prepare what’s to come: we will create a clear logical hierarchy for our units that can be either buildings or characters. We started that process in a previous episode of this series, but we’re not done yet.

At that point, you might realise that we could — and should! — re-use the notions of inheritance and polymorphism we saw in the previous tutorial for our data and unit classes. What we want is to replicate the kind of class hierarchy we have between UnitManager and BuildingManager at two levels:

Proxying for the data classes (UnitData/BuildingData)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4