·
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:
BuildingData
class should inherit from a UnitData
classBuilding
class should inherit from a Unit
classUnitData
/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