Create Building - UQdeco2800/2022-studio-3 GitHub Wiki

Creating a building entity

createBaseBuilding()

Buildings are created through the BuildingFactory and are spawned in the AtlantisGameArea. When a building is created, it first calls the createBaseBuilding() function which creates an entity and adds all common building components to it which all other building entities are based off of. In each specific building create function, the other components are added. These components are added afterwards as the values passed to the component constructors differ depending on which specific building is being created. The process of creating a base building can be seen in the sequence diagram below. Create Base Building