Loading...
Searching...
No Matches
CityBuilderCore.ToolsManager Class Reference

Detailed Description

simple IToolsManager implementation that should suffice for most cases

https://citybuilder.softleitner.com/manual

Inheritance diagram for CityBuilderCore.ToolsManager:
CityBuilderCore.IToolsManager

Public Member Functions

void ActivateTool (BaseTool tool)
 deactivate the currently active tool and activate the new one
 
void DeactivateTool (BaseTool tool)
 deactivate the currently active tool if it is the one passed
 
int GetCost (Item item)
 checks the active tool for any item costs that should be shown as a previous
for example building costs while the building tool is active
 

Public Attributes

BaseTool FallbackTool
 
ToggleGroup ToggleGroup
 
UnityEvent< BaseToolToolChanged
 

Protected Member Functions

virtual void Awake ()
 

Properties

BaseTool ActiveTool [get]
 the currently active tool or null when none
 
- Properties inherited from CityBuilderCore.IToolsManager

Member Function Documentation

◆ ActivateTool()

void CityBuilderCore.ToolsManager.ActivateTool ( BaseTool tool)
inline

deactivate the currently active tool and activate the new one

Parameters
toolthe tool that will become active

Implements CityBuilderCore.IToolsManager.

◆ DeactivateTool()

void CityBuilderCore.ToolsManager.DeactivateTool ( BaseTool tool)
inline

deactivate the currently active tool if it is the one passed

Parameters
toolthe tool to deactivate

Implements CityBuilderCore.IToolsManager.

◆ GetCost()

int CityBuilderCore.ToolsManager.GetCost ( Item item)

checks the active tool for any item costs that should be shown as a previous
for example building costs while the building tool is active

Parameters
itemthe item for which to check cost
Returns
how many items are needed to perform the action of the current tool

Implements CityBuilderCore.IToolsManager.

Property Documentation

◆ ActiveTool

BaseTool CityBuilderCore.ToolsManager.ActiveTool
get

the currently active tool or null when none

Implements CityBuilderCore.IToolsManager.