Skip to main content
Version: Next

Building Service

Description

A service used to denote a space that is used for living or working by agents.

Interface

Type
IBuildingService

Inherits

Type
IMonoBehaviour

Properties

NameType
dataIBuildingData
suiteISuiteService
agentPositionIAgentPositionService

Public Methods

NameParametersReturn TypeDescription
SetupIBuildingData data, GameObject obj = nullvoidUsed by the UI to setup the service.
GetSuiteServiceN/AISuiteServiceReturns the suite.
GetAgentPositionServiceN/AIAgentPositionServiceReturns the agentPosition.
GetAgentRelationshipIAgentService agentIBuildingRelationshipReturns the relationship the agent has to the building if any.
GetZoneServiceN/AIZoneServiceReturns the zone service from data.
GetEntranceN/AVector3Returns the building entrance.
GetCurrentTypeN/ABUILDING_TYPE?Returns what type of building it is.
GetItemsITEMS name = ITEMS.NULL, ITEMS_TYPE type = ITEMS_TYPE.NULL, ITEMS_SIZE size = ITEMS_SIZE.NULLList<Item>Returns the items owned by the building filtered by parameters.
RemoveItemItem itembooleanRemoves the item from the building ownership if present.
AddItemItem itembooleanAdds the item to the building ownership.
SetItemsList<Item> itemsvoidAdds a list of items to the building ownership.
GetRouteinteger idvoidReturns the data route assigned to the id.
ResetBuildingN/AbooleanResets all data for the building.
IsEnabledN/AbooleanReturns if enabled.
SetEnabledboolean valuevoidSets if the building is enabled.